From eaff6569e2fd317503c96eeba8e9c515d0734a44 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 4 Jun 2022 13:27:03 +0800 Subject: [PATCH] Improve doc of `mouse-drag-mode-line-buffer' * doc/emacs/frames.texi (Mouse Commands): Document `mouse-drag-mode-line-buffer'. * etc/NEWS: Explain where that option is supported. * lisp/mouse.el (mouse-drag-mode-line-buffer): Likewise. --- doc/emacs/frames.texi | 6 ++++++ etc/NEWS | 4 +++- lisp/mouse.el | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 28b4d2d0e42..a853c9a228b 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -136,6 +136,12 @@ entirely on the screen. The number of lines scrolled per step depends on how far away from the window edge the mouse has gone; the variable @code{mouse-scroll-min-lines} specifies a minimum step size. +@vindex mouse-drag-mode-line-buffer + If you enable the option @code{mouse-drag-mode-line-buffer} and +dragging files is supported by the window system, then dragging the +mouse on the buffer name portion of the mode line will drag that +buffer's file to another program or frame. + @findex mouse-yank-primary @findex mouse-yank-at-click Clicking with the middle mouse button, @kbd{mouse-2}, moves point to diff --git a/etc/NEWS b/etc/NEWS index d140bb09605..777c8eb341c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -305,9 +305,11 @@ the current Emacs process at the end, it starts a new Emacs process optional parameters to restart instead of just killing the current process. ++++ ** New user option 'mouse-drag-mode-line-buffer'. If non-nil, dragging on the buffer name part of the mode-line will -drag the buffer's associated file to other programs. +drag the buffer's associated file to other programs. This option is +currently only available on X, Haiku and Nextstep (GNUstep or macOS). +++ ** New user option 'mouse-drag-and-drop-region-cross-program'. diff --git a/lisp/mouse.el b/lisp/mouse.el index 1f2e9252228..737c5078704 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -111,7 +111,10 @@ down and up respectively." (defcustom mouse-drag-mode-line-buffer nil "If non-nil, allow dragging files from the mode line. When the buffer has an associated file, it can be dragged from -the buffer name portion of its mode line to other programs." +the buffer name portion of its mode line to other programs. + +This option is only supported on X, Haiku and Nextstep (GNUstep +or macOS)." :type 'boolean :version "29.1") -- 2.39.2