emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: [PATCH] New tab-bar-detach-tab command


From: Juri Linkov
Subject: Re: [External] : Re: [PATCH] New tab-bar-detach-tab command
Date: Tue, 05 Oct 2021 19:40:49 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> Also since 'clone-frame' doesn't duplicate the frame,
>> we could add a new command 'duplicate-frame' as well.
>
> I don't know the signature of the `clone-frame'
> that was added to Emacs, but perhaps it could use
> a prefix arg to provide what you're proposing:
> clone the frame (same frame parameters) AND clone
> the window config of the frame in the new frame.

Its prefix arg is already used for something useless:

  (defun clone-frame (&optional frame use-default-parameters)
    "Make a new frame with the same parameters as FRAME.
  With a prefix arg (USE-DEFAULT-PARAMETERS), use
  `default-frame-alist' instead.

  FRAME defaults to the selected frame.  The frame is created on the
  same terminal as FRAME.  If the terminal is a text-only terminal then
  also select the new frame."
    (interactive "i\nP")
    (if use-default-parameters
        (make-frame-command)
      (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))
        new-frame)))

Why does it use the prefix arg just to call another command
'make-frame-command'?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]