diff options
| author | Richard M. Stallman | 1993-05-25 22:59:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-25 22:59:26 +0000 |
| commit | 8b87a301047d32f26b330ec2bd31001923f64ae9 (patch) | |
| tree | f278163275b4241ae7631e34bc20169807dafb31 | |
| parent | 1e12dd87cf755ea090a7b7b13994910e6ce83249 (diff) | |
| download | emacs-8b87a301047d32f26b330ec2bd31001923f64ae9.tar.gz emacs-8b87a301047d32f26b330ec2bd31001923f64ae9.zip | |
(dired-unmark-all-files): Read arg as a string.
| -rw-r--r-- | lisp/dired.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index f26677d2063..9b1ca12aebc 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1752,22 +1752,19 @@ OLD and NEW are both characters used to mark files." | |||
| 1752 | (delete-region (point) (1+ (point))) | 1752 | (delete-region (point) (1+ (point))) |
| 1753 | (insert-char new 1))))) | 1753 | (insert-char new 1))))) |
| 1754 | 1754 | ||
| 1755 | (defun dired-unmark-all-files (flag &optional arg) | 1755 | (defun dired-unmark-all-files (mark &optional arg) |
| 1756 | "Remove a specific mark or any mark from every file. | 1756 | "Remove a specific mark or any mark from every file. |
| 1757 | With prefix arg, query for each marked file. | 1757 | With prefix arg, query for each marked file. |
| 1758 | Type \\[help-command] at that time for help." | 1758 | Type \\[help-command] at that time for help." |
| 1759 | (interactive | 1759 | (interactive "sRemove marks (RET means all): \nP") |
| 1760 | (let* ((cursor-in-echo-area t)) | ||
| 1761 | (list (progn (message "Remove marks (RET means all): ") (read-char)) | ||
| 1762 | current-prefix-arg))) | ||
| 1763 | (let ((count 0) | 1760 | (let ((count 0) |
| 1764 | (re (if (zerop (length flag)) dired-re-mark | 1761 | (re (if (zerop (length mark)) dired-re-mark |
| 1765 | (concat "^" (regexp-quote flag))))) | 1762 | (concat "^" (regexp-quote mark))))) |
| 1766 | (save-excursion | 1763 | (save-excursion |
| 1767 | (let (buffer-read-only case-fold-search query | 1764 | (let (buffer-read-only case-fold-search query |
| 1768 | (help-form "\ | 1765 | (help-form "\ |
| 1769 | Type SPC or `y' to unflag one file, DEL or `n' to skip to next, | 1766 | Type SPC or `y' to unmark one file, DEL or `n' to skip to next, |
| 1770 | `!' to unflag all remaining files with no more questions.")) | 1767 | `!' to unmark all remaining files with no more questions.")) |
| 1771 | (goto-char (point-min)) | 1768 | (goto-char (point-min)) |
| 1772 | (while (re-search-forward re nil t) | 1769 | (while (re-search-forward re nil t) |
| 1773 | (if (or (not arg) | 1770 | (if (or (not arg) |
| @@ -1775,7 +1772,7 @@ Type SPC or `y' to unflag one file, DEL or `n' to skip to next, | |||
| 1775 | (dired-get-filename t))) | 1772 | (dired-get-filename t))) |
| 1776 | (progn (delete-char -1) (insert " ") (setq count (1+ count)))) | 1773 | (progn (delete-char -1) (insert " ") (setq count (1+ count)))) |
| 1777 | (forward-line 1)))) | 1774 | (forward-line 1)))) |
| 1778 | (message "%s" (format "Flags removed: %d %s" count flag) ))) | 1775 | (message "%s" (format "Marks removed: %d %s" count mark)))) |
| 1779 | 1776 | ||
| 1780 | ;; Logging failures operating on files, and showing the results. | 1777 | ;; Logging failures operating on files, and showing the results. |
| 1781 | 1778 | ||