1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 12:59:26 +00:00

* lisp/frame.el (make-frame-on-monitor): Add default value. (Bug#34516)

This commit is contained in:
Juri Linkov 2019-03-27 23:46:39 +02:00
parent 3f87676e75
commit 4da44cdaaf

View File

@ -676,12 +676,16 @@ The optional argument PARAMETERS specifies additional frame parameters."
"Make a frame on monitor MONITOR.
The optional argument DISPLAY can be a display name, and the optional
argument PARAMETERS specifies additional frame parameters."
(interactive (list (completing-read
(format "Make frame on monitor: ")
(or (delq nil (mapcar (lambda (a)
(cdr (assq 'name a)))
(display-monitor-attributes-list)))
'("")))))
(interactive
(list
(let* ((default (cdr (assq 'name (frame-monitor-attributes)))))
(completing-read
(format "Make frame on monitor (default %s): " default)
(or (delq nil (mapcar (lambda (a)
(cdr (assq 'name a)))
(display-monitor-attributes-list)))
'(""))
nil nil nil nil default))))
(let* ((monitor-workarea
(catch 'done
(dolist (a (display-monitor-attributes-list display))