1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Filter out the `name' parameter in clone-frame

* lisp/frame.el (clone-frame): Filter out the `name' parameter,
because two frames shouldn't have the same name and this will
lead to a warning.
This commit is contained in:
Lars Ingebrigtsen 2021-09-01 16:27:06 +02:00
parent b3a9d8cd3d
commit c42bb9d75c

View file

@ -798,7 +798,10 @@ also select the new frame."
(interactive "i\nP")
(if use-default-parameters
(make-frame-command)
(let* ((default-frame-alist (frame-parameters frame))
(let* ((default-frame-alist (seq-filter
(lambda (elem)
(not (eq (car elem) 'name)))
(frame-parameters frame)))
(new-frame (make-frame)))
(unless (display-graphic-p)
(select-frame new-frame))