mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(dired-change-marks): Just ding if one arg is RET.
Search for strings, not regexps. Use subst-char-in-region.
This commit is contained in:
parent
47c0f58be5
commit
e4e0284102
1 changed files with 9 additions and 8 deletions
|
|
@ -1750,14 +1750,15 @@ OLD and NEW are both characters used to mark files."
|
|||
(new (progn (message "Change %c marks to (new mark): " old)
|
||||
(read-char))))
|
||||
(list old new)))
|
||||
(let ((regexp (format "^%s" (regexp-quote old)))
|
||||
(buffer-read-only))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward regexp nil t)
|
||||
(beginning-of-line)
|
||||
(delete-region (point) (1+ (point)))
|
||||
(insert-char new 1)))))
|
||||
(if (or (eq old ?\r) (eq new ?\r))
|
||||
(ding)
|
||||
(let ((string (format "\n%c" old))
|
||||
(buffer-read-only))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (search-forward string nil t)
|
||||
(subst-char-in-region (match-beginning 0)
|
||||
(match-end 0) old new))))))
|
||||
|
||||
(defun dired-unmark-all-files (mark &optional arg)
|
||||
"Remove a specific mark or any mark from every file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue