1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Improve and clarify documentation of 'dired-click-to-select-mode'

* lisp/dired.el (dired-click-to-select-mode)
(dired-post-do-command):
* doc/emacs/dired.texi (Marks vs Flags): Improve documentation of
'dired-click-to-select-mode'.
This commit is contained in:
Eli Zaretskii 2025-08-23 16:33:45 +03:00
parent 5d23fc9467
commit 90c44826f5
2 changed files with 19 additions and 14 deletions

View file

@ -702,14 +702,14 @@ the directory.
@kindex touchscreen-hold @r{(Dired)} @kindex touchscreen-hold @r{(Dired)}
@findex dired-click-to-select-mode @findex dired-click-to-select-mode
@findex dired-enable-click-to-select-mode @findex dired-enable-click-to-select-mode
Enter a ``click to select'' mode, where using the mouse button Enter a ``click to select'' mode (@code{dired-click-to-select-mode}),
@kbd{mouse-2} on a file name will cause its mark to be toggled. This where using the mouse button @kbd{mouse-2} on a file name will cause its
mode is useful when performing file management using a touch screen mark to be toggled. This mode is useful when performing file management
device. using a touch screen device.
It is enabled when a ``hold'' gesture (@pxref{Touchscreens}) is It is enabled when a ``hold'' gesture (@pxref{Touchscreens}) is detected
detected over a file name, and is automatically disabled once a Dired over a file name, and is automatically disabled once a Dired command
command operates on the marked files. that operates on the marked files finishes.
@end table @end table
@node Operating on Files @node Operating on Files

View file

@ -4057,7 +4057,10 @@ non-empty directories is allowed."
(message "(No deletions requested)"))))) (message "(No deletions requested)")))))
(defun dired-post-do-command () (defun dired-post-do-command ()
"Disable `dired-click-to-select-mode' after an operation." "Disable `dired-click-to-select-mode' if enabled..
This is called after Dired finishes an operation on marked files, and it
disables `dired-click-to-select-mode' that is automatically enabled
by the \"hold\" touch-screen gestures."
(when dired-click-to-select-mode (when dired-click-to-select-mode
(dired-click-to-select-mode -1))) (dired-click-to-select-mode -1)))
@ -5381,12 +5384,14 @@ When this minor mode is enabled, using `mouse-2' on a file name
within a Dired buffer will toggle its mark instead of going to it within a Dired buffer will toggle its mark instead of going to it
within another window. within another window.
Disabling this minor mode will unmark all files within the Dired This minor mode is intended to be used when performing file management
buffer. using a touch-screen device. The mode is automatically enabled when a
\"hold\" gesture over a file name is received, and is therefore
`dired-click-to-select-mode' is automatically disabled after any automatically disabled after any Dired operation on the marked
Dired operation (command whose name starts with `dired-do') files (any command whose name starts with \"dired-do-\" and which
completes." performs some operation on the marked files) completes. When the mode
is automatically disabled, it unmarks all the marked files in the Dired
buffer."
:group 'dired :group 'dired
:lighter " Click-To-Select" :lighter " Click-To-Select"
(unless (derived-mode-p '(dired-mode wdired-mode)) (unless (derived-mode-p '(dired-mode wdired-mode))