]> git.eshelyaron.com Git - emacs.git/commitdiff
Filter out the `name' parameter in clone-frame
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Sep 2021 14:27:06 +0000 (16:27 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Sep 2021 14:27:06 +0000 (16:27 +0200)
* 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.

lisp/frame.el

index f36a34db7d79ac91e2fd984564a1a56cbba6caca..60234fc2ae963832189063e1a3a33b6ef538ba65 100644 (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))