mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
; Fix last change (bug#79042)
This commit is contained in:
parent
740138b113
commit
3b2bfdfef6
1 changed files with 24 additions and 16 deletions
|
|
@ -1870,8 +1870,8 @@ see `dired-use-ls-dired' for more details.")
|
||||||
|
|
||||||
(defun dired-mouse-drag (event)
|
(defun dired-mouse-drag (event)
|
||||||
"Begin a drag-and-drop operation for the file at EVENT.
|
"Begin a drag-and-drop operation for the file at EVENT.
|
||||||
If there are marked files and that file is marked, drag every
|
If there are marked files and the file at EVENT is marked, drag all the
|
||||||
other marked file as well. Otherwise, unmark all files."
|
other marked files as well. Otherwise, unmark all files."
|
||||||
(interactive "e" dired-mode)
|
(interactive "e" dired-mode)
|
||||||
(when mark-active
|
(when mark-active
|
||||||
(deactivate-mark))
|
(deactivate-mark))
|
||||||
|
|
@ -1907,19 +1907,24 @@ other marked file as well. Otherwise, unmark all files."
|
||||||
;; We can get an error if there's by some chance no file
|
;; We can get an error if there's by some chance no file
|
||||||
;; name at point.
|
;; name at point.
|
||||||
(condition-case error
|
(condition-case error
|
||||||
(let ((filename (with-selected-window (posn-window
|
(let ((filename
|
||||||
(event-end event))
|
(with-selected-window (posn-window
|
||||||
(let ((marked-files (dired-map-over-marks (dired-get-filename
|
(event-end event))
|
||||||
nil 'no-error-if-not-filep)
|
(let ((marked-files
|
||||||
'marked))
|
(dired-map-over-marks (dired-get-filename
|
||||||
(file-name (dired-get-filename nil 'no-error-if-not-filep)))
|
nil
|
||||||
(if (and marked-files
|
'no-error-if-not-filep)
|
||||||
(member file-name marked-files))
|
'marked))
|
||||||
marked-files
|
(file-name
|
||||||
(when marked-files
|
(dired-get-filename nil
|
||||||
(dired-map-over-marks (dired-unmark nil)
|
'no-error-if-not-filep)))
|
||||||
'marked))
|
(if (and marked-files
|
||||||
file-name)))))
|
(member file-name marked-files))
|
||||||
|
marked-files
|
||||||
|
(when marked-files
|
||||||
|
(dired-map-over-marks (dired-unmark nil)
|
||||||
|
'marked))
|
||||||
|
file-name)))))
|
||||||
(when filename
|
(when filename
|
||||||
(if (and (consp filename)
|
(if (and (consp filename)
|
||||||
(cdr filename))
|
(cdr filename))
|
||||||
|
|
@ -3984,7 +3989,10 @@ non-empty directories is allowed."
|
||||||
(defun dired-do-delete (&optional arg)
|
(defun dired-do-delete (&optional arg)
|
||||||
"Delete all marked (or next ARG) files.
|
"Delete all marked (or next ARG) files.
|
||||||
`dired-recursive-deletes' controls whether deletion of
|
`dired-recursive-deletes' controls whether deletion of
|
||||||
non-empty directories is allowed."
|
non-empty directories is allowed.
|
||||||
|
|
||||||
|
When called from Lisp, if ARG is the symbol `marked', delete
|
||||||
|
only the marked files, or none if no files are marked."
|
||||||
;; This is more consistent with the file marking feature than
|
;; This is more consistent with the file marking feature than
|
||||||
;; dired-do-flagged-delete.
|
;; dired-do-flagged-delete.
|
||||||
(interactive "P" dired-mode)
|
(interactive "P" dired-mode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue