branch: externals/beframe commit 6c694a5a4625b987a01e97f54bfeb4476094fced Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make beframe-do-not-assume-last-selected-buffer silent --- beframe.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/beframe.el b/beframe.el index 84ca15db1d..594f000348 100644 --- a/beframe.el +++ b/beframe.el @@ -430,7 +430,7 @@ Also see the other Beframe commands: (cons list-1 list-2) (cons list-2 list-1)))) -(defun beframe--modify-buffer-list (operation buffers) +(defun beframe--modify-buffer-list (operation buffers &optional no-message) "Perform OPERATION to modify the current frame buffer list. OPERATION is a keyword to :assume or :unassume. To assume is to include @@ -440,7 +440,10 @@ buffer list. BUFFERS is a list of buffer objects to be added or removed from the current frame buffer list. If BUFFERS satisfies `framep', then the list of buffers is that of the corresponding frame object (per -`beframe--get-buffers')." +`beframe--get-buffers'). + +With optional NO-MESSAGE, do not produce a message reporting on the +operation." (pcase-let* ((frame-buffers (beframe--get-buffers)) (new-buffers (if (framep buffers) (beframe--get-buffers buffers) @@ -461,11 +464,13 @@ of buffers is that of the corresponding frame object (per (mapcar #'buffer-name (cdr lists))))) (progn (modify-frame-parameters nil `((buffer-list . ,consolidated-buffers))) - (message "%s %s buffers: %s" - (propertize action 'face 'error) - (propertize (format "%s" (length difference)) 'face 'warning) - (propertize (format "%s" difference) 'face 'success))) - (message "No change to the frame's buffer list")))) + (unless no-message + (message "%s current frame %s buffers: %s" + (propertize action 'face 'error) + (propertize (format "%s" (length difference)) 'face 'warning) + (propertize (format "%s" difference) 'face 'success)))) + (unless no-message + (message "No change to the frame's buffer list"))))) ;;;###autoload (defun beframe-assume-frame-buffers (frame) @@ -877,7 +882,7 @@ If FRAME is nil, use the current frame." (defun beframe-do-not-assume-last-selected-buffer (&rest _) "Unassume the buffer of the most recently used window from the new frame." - (beframe--modify-buffer-list :unassume (list (window-buffer (get-mru-window))))) + (beframe--modify-buffer-list :unassume (list (window-buffer (get-mru-window))) :no-message)) (defun beframe--with-other-frame (&rest app) "Apply APP with `other-frame-prefix'.