aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-08-23 16:33:45 +0300
committerEli Zaretskii2025-08-23 16:33:45 +0300
commit90c44826f545f71f0f7621c33eff0e5ec5ec4ffc (patch)
tree9d8d96e98592530d34ecfb45e9454cb30081c73d
parent5d23fc9467ebc26a93c1b5bc45bf26026b9319cb (diff)
downloademacs-90c44826f545f71f0f7621c33eff0e5ec5ec4ffc.tar.gz
emacs-90c44826f545f71f0f7621c33eff0e5ec5ec4ffc.zip
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'.
-rw-r--r--doc/emacs/dired.texi16
-rw-r--r--lisp/dired.el19
2 files changed, 20 insertions, 15 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 602c8e5bfb2..e49823384ce 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -702,14 +702,14 @@ the directory.
702@kindex touchscreen-hold @r{(Dired)} 702@kindex touchscreen-hold @r{(Dired)}
703@findex dired-click-to-select-mode 703@findex dired-click-to-select-mode
704@findex dired-enable-click-to-select-mode 704@findex dired-enable-click-to-select-mode
705Enter a ``click to select'' mode, where using the mouse button 705Enter a ``click to select'' mode (@code{dired-click-to-select-mode}),
706@kbd{mouse-2} on a file name will cause its mark to be toggled. This 706where using the mouse button @kbd{mouse-2} on a file name will cause its
707mode is useful when performing file management using a touch screen 707mark to be toggled. This mode is useful when performing file management
708device. 708using a touch screen device.
709 709
710It is enabled when a ``hold'' gesture (@pxref{Touchscreens}) is 710It is enabled when a ``hold'' gesture (@pxref{Touchscreens}) is detected
711detected over a file name, and is automatically disabled once a Dired 711over a file name, and is automatically disabled once a Dired command
712command operates on the marked files. 712that operates on the marked files finishes.
713@end table 713@end table
714 714
715@node Operating on Files 715@node Operating on Files
diff --git a/lisp/dired.el b/lisp/dired.el
index 103c273ccfd..996ca9c23bb 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4057,7 +4057,10 @@ non-empty directories is allowed."
4057 (message "(No deletions requested)"))))) 4057 (message "(No deletions requested)")))))
4058 4058
4059(defun dired-post-do-command () 4059(defun dired-post-do-command ()
4060 "Disable `dired-click-to-select-mode' after an operation." 4060 "Disable `dired-click-to-select-mode' if enabled..
4061This is called after Dired finishes an operation on marked files, and it
4062disables `dired-click-to-select-mode' that is automatically enabled
4063by the \"hold\" touch-screen gestures."
4061 (when dired-click-to-select-mode 4064 (when dired-click-to-select-mode
4062 (dired-click-to-select-mode -1))) 4065 (dired-click-to-select-mode -1)))
4063 4066
@@ -5381,12 +5384,14 @@ When this minor mode is enabled, using `mouse-2' on a file name
5381within a Dired buffer will toggle its mark instead of going to it 5384within a Dired buffer will toggle its mark instead of going to it
5382within another window. 5385within another window.
5383 5386
5384Disabling this minor mode will unmark all files within the Dired 5387This minor mode is intended to be used when performing file management
5385buffer. 5388using a touch-screen device. The mode is automatically enabled when a
5386 5389\"hold\" gesture over a file name is received, and is therefore
5387`dired-click-to-select-mode' is automatically disabled after any 5390automatically disabled after any Dired operation on the marked
5388Dired operation (command whose name starts with `dired-do') 5391files (any command whose name starts with \"dired-do-\" and which
5389completes." 5392performs some operation on the marked files) completes. When the mode
5393is automatically disabled, it unmarks all the marked files in the Dired
5394buffer."
5390 :group 'dired 5395 :group 'dired
5391 :lighter " Click-To-Select" 5396 :lighter " Click-To-Select"
5392 (unless (derived-mode-p '(dired-mode wdired-mode)) 5397 (unless (derived-mode-p '(dired-mode wdired-mode))