diff options
| author | Juri Linkov | 2015-10-30 02:57:38 +0200 |
|---|---|---|
| committer | Juri Linkov | 2015-10-30 02:57:38 +0200 |
| commit | 83a04da79dfb8c3c36062d092e21a706d2e49b42 (patch) | |
| tree | 7bc2d289cc57e069f5ca561c757d70129f258d6b | |
| parent | dba0659c3b37a413245b424d75e8989b0bb46a07 (diff) | |
| download | emacs-83a04da79dfb8c3c36062d092e21a706d2e49b42.tar.gz emacs-83a04da79dfb8c3c36062d092e21a706d2e49b42.zip | |
* lisp/dired.el (dired-unmark-all-files-query): Declare.
(dired-unmark-all-files): Let-bind it and use instead of ‘query’.
(Bug#21746)
| -rw-r--r-- | lisp/dired.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index c3cad0ccc82..5f0a83afd04 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3495,6 +3495,9 @@ OLD and NEW are both characters used to mark files." | |||
| 3495 | (interactive) | 3495 | (interactive) |
| 3496 | (dired-unmark-all-files ?\r)) | 3496 | (dired-unmark-all-files ?\r)) |
| 3497 | 3497 | ||
| 3498 | ;; Bound in dired-unmark-all-files | ||
| 3499 | (defvar dired-unmark-all-files-query) | ||
| 3500 | |||
| 3498 | (defun dired-unmark-all-files (mark &optional arg) | 3501 | (defun dired-unmark-all-files (mark &optional arg) |
| 3499 | "Remove a specific mark (or any mark) from every file. | 3502 | "Remove a specific mark (or any mark) from every file. |
| 3500 | After this command, type the mark character to remove, | 3503 | After this command, type the mark character to remove, |
| @@ -3505,6 +3508,7 @@ Type \\[help-command] at that time for help." | |||
| 3505 | (save-excursion | 3508 | (save-excursion |
| 3506 | (let* ((count 0) | 3509 | (let* ((count 0) |
| 3507 | (inhibit-read-only t) case-fold-search | 3510 | (inhibit-read-only t) case-fold-search |
| 3511 | dired-unmark-all-files-query | ||
| 3508 | (string (format "\n%c" mark)) | 3512 | (string (format "\n%c" mark)) |
| 3509 | (help-form "\ | 3513 | (help-form "\ |
| 3510 | Type SPC or `y' to unmark one file, DEL or `n' to skip to next, | 3514 | Type SPC or `y' to unmark one file, DEL or `n' to skip to next, |
| @@ -3516,7 +3520,8 @@ Type SPC or `y' to unmark one file, DEL or `n' to skip to next, | |||
| 3516 | (if (or (not arg) | 3520 | (if (or (not arg) |
| 3517 | (let ((file (dired-get-filename t t))) | 3521 | (let ((file (dired-get-filename t t))) |
| 3518 | (and file | 3522 | (and file |
| 3519 | (dired-query 'query "Unmark file `%s'? " | 3523 | (dired-query 'dired-unmark-all-files-query |
| 3524 | "Unmark file `%s'? " | ||
| 3520 | file)))) | 3525 | file)))) |
| 3521 | (progn (subst-char-in-region (1- (point)) (point) | 3526 | (progn (subst-char-in-region (1- (point)) (point) |
| 3522 | (preceding-char) ?\s) | 3527 | (preceding-char) ?\s) |