Mercurial > emacs
changeset 12736:a7253dcf5f9d
(dired-insert-set-properties): Catch errors.
(dired-do-flagged-delete): New arg nomessage.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 31 Jul 1995 23:13:54 +0000 |
parents | 2e79a07a9c27 |
children | 7b804de92243 |
files | lisp/dired.el |
diffstat | 1 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Mon Jul 31 20:19:25 1995 +0000 +++ b/lisp/dired.el Mon Jul 31 23:13:54 1995 +0000 @@ -577,12 +577,14 @@ (save-excursion (goto-char beg) (while (< (point) end) - (if (dired-move-to-filename) - (put-text-property (point) - (save-excursion - (dired-move-to-end-of-filename) - (point)) - 'mouse-face 'highlight)) + (condition-case nil + (if (dired-move-to-filename) + (put-text-property (point) + (save-excursion + (dired-move-to-end-of-filename) + (point)) + 'mouse-face 'highlight)) + (error nil)) (forward-line 1)))) (defun dired-insert-headerline (dir);; also used by dired-insert-subdir @@ -1588,8 +1590,10 @@ ;; Deleting files -(defun dired-do-flagged-delete () - "In dired, delete the files flagged for deletion." +(defun dired-do-flagged-delete (&optional nomessage) + "In dired, delete the files flagged for deletion. +If NOMESSAGE is non-nil, we don't display any message +if there are no flagged files." (interactive) (let* ((dired-marker-char dired-del-marker) (regexp (dired-marker-regexp)) @@ -1601,7 +1605,8 @@ (dired-map-over-marks (cons (dired-get-filename) (point)) nil) nil) - (message "(No deletions requested)")))) + (or nomessage + (message "(No deletions requested)"))))) (defun dired-do-delete (&optional arg) "Delete all marked (or next ARG) files."