aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-07-19 13:05:05 +0300
committerEli Zaretskii2025-07-19 13:05:05 +0300
commit3b2bfdfef63f051a36f4043c32596458ccae605f (patch)
treee7eaebbae4e34eb277a5b7b9dc7f863470bad2c2
parent740138b113ab420a90b70865ac6dfffcbbc444ee (diff)
downloademacs-3b2bfdfef63f051a36f4043c32596458ccae605f.tar.gz
emacs-3b2bfdfef63f051a36f4043c32596458ccae605f.zip
; Fix last change (bug#79042)
-rw-r--r--lisp/dired.el40
1 files changed, 24 insertions, 16 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 5ad41752d8f..0a07339e146 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1870,8 +1870,8 @@ see `dired-use-ls-dired' for more details.")
1870 1870
1871(defun dired-mouse-drag (event) 1871(defun dired-mouse-drag (event)
1872 "Begin a drag-and-drop operation for the file at EVENT. 1872 "Begin a drag-and-drop operation for the file at EVENT.
1873If there are marked files and that file is marked, drag every 1873If there are marked files and the file at EVENT is marked, drag all the
1874other marked file as well. Otherwise, unmark all files." 1874other marked files as well. Otherwise, unmark all files."
1875 (interactive "e" dired-mode) 1875 (interactive "e" dired-mode)
1876 (when mark-active 1876 (when mark-active
1877 (deactivate-mark)) 1877 (deactivate-mark))
@@ -1907,19 +1907,24 @@ other marked file as well. Otherwise, unmark all files."
1907 ;; We can get an error if there's by some chance no file 1907 ;; We can get an error if there's by some chance no file
1908 ;; name at point. 1908 ;; name at point.
1909 (condition-case error 1909 (condition-case error
1910 (let ((filename (with-selected-window (posn-window 1910 (let ((filename
1911 (event-end event)) 1911 (with-selected-window (posn-window
1912 (let ((marked-files (dired-map-over-marks (dired-get-filename 1912 (event-end event))
1913 nil 'no-error-if-not-filep) 1913 (let ((marked-files
1914 'marked)) 1914 (dired-map-over-marks (dired-get-filename
1915 (file-name (dired-get-filename nil 'no-error-if-not-filep))) 1915 nil
1916 (if (and marked-files 1916 'no-error-if-not-filep)
1917 (member file-name marked-files)) 1917 'marked))
1918 marked-files 1918 (file-name
1919 (when marked-files 1919 (dired-get-filename nil
1920 (dired-map-over-marks (dired-unmark nil) 1920 'no-error-if-not-filep)))
1921 'marked)) 1921 (if (and marked-files
1922 file-name))))) 1922 (member file-name marked-files))
1923 marked-files
1924 (when marked-files
1925 (dired-map-over-marks (dired-unmark nil)
1926 'marked))
1927 file-name)))))
1923 (when filename 1928 (when filename
1924 (if (and (consp filename) 1929 (if (and (consp filename)
1925 (cdr filename)) 1930 (cdr filename))
@@ -3984,7 +3989,10 @@ non-empty directories is allowed."
3984(defun dired-do-delete (&optional arg) 3989(defun dired-do-delete (&optional arg)
3985 "Delete all marked (or next ARG) files. 3990 "Delete all marked (or next ARG) files.
3986`dired-recursive-deletes' controls whether deletion of 3991`dired-recursive-deletes' controls whether deletion of
3987non-empty directories is allowed." 3992non-empty directories is allowed.
3993
3994When called from Lisp, if ARG is the symbol `marked', delete
3995only the marked files, or none if no files are marked."
3988 ;; This is more consistent with the file marking feature than 3996 ;; This is more consistent with the file marking feature than
3989 ;; dired-do-flagged-delete. 3997 ;; dired-do-flagged-delete.
3990 (interactive "P" dired-mode) 3998 (interactive "P" dired-mode)