/[emacs]/emacs/lisp/dired.el
ViewVC logotype

Diff of /emacs/lisp/dired.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.213 by eliz, Tue Nov 20 09:38:08 2001 UTC revision 1.214 by sds, Tue Nov 27 15:52:52 2001 UTC
# Line 317  Subexpression 2 must end right before th Line 317  Subexpression 2 must end right before th
317  ;; It should end with a noun that can be pluralized by adding `s'.  ;; It should end with a noun that can be pluralized by adding `s'.
318  ;; Return value is the number of files marked, or nil if none were marked.  ;; Return value is the number of files marked, or nil if none were marked.
319  (defmacro dired-mark-if (predicate msg)  (defmacro dired-mark-if (predicate msg)
320    (` (let (buffer-read-only count)    `(let (buffer-read-only count)
321         (save-excursion      (save-excursion
322           (setq count 0)        (setq count 0)
323           (if (, msg) (message "Marking %ss..." (, msg)))        (if ,msg (message "Marking %ss..." ,msg))
324           (goto-char (point-min))        (goto-char (point-min))
325           (while (not (eobp))        (while (not (eobp))
326             (if (, predicate)          (if ,predicate
327                 (progn              (progn
328                   (delete-char 1)                (delete-char 1)
329                   (insert dired-marker-char)                (insert dired-marker-char)
330                   (setq count (1+ count))))                (setq count (1+ count))))
331             (forward-line 1))          (forward-line 1))
332           (if (, msg) (message "%s %s%s %s%s."        (if ,msg (message "%s %s%s %s%s."
333                            count                          count
334                            (, msg)                          ,msg
335                            (dired-plural-s count)                          (dired-plural-s count)
336                            (if (eq dired-marker-char ?\040) "un" "")                          (if (eq dired-marker-char ?\040) "un" "")
337                            (if (eq dired-marker-char dired-del-marker)                          (if (eq dired-marker-char dired-del-marker)
338                                "flagged" "marked"))))                              "flagged" "marked"))))
339         (and (> count 0) count))))      (and (> count 0) count)))
340    
341  (defmacro dired-map-over-marks (body arg &optional show-progress)  (defmacro dired-map-over-marks (body arg &optional show-progress)
342    "Eval BODY with point on each marked line.  Return a list of BODY's results.    "Eval BODY with point on each marked line.  Return a list of BODY's results.

Legend:
Removed from v.1.213  
changed lines
  Added in v.1.214

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26