aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-10-04 23:38:28 +0000
committerStefan Monnier2000-10-04 23:38:28 +0000
commit89101e46acb008f64d2b0c17b627e9af2f5d8cfa (patch)
treed0733a89dfa8e3239261d96c0ba7da1c6f69a396
parent616e14f4cf26c2ec2bc06097cae9043a2f0118ec (diff)
downloademacs-89101e46acb008f64d2b0c17b627e9af2f5d8cfa.tar.gz
emacs-89101e46acb008f64d2b0c17b627e9af2f5d8cfa.zip
(dired-mark-pop-up): Turn comment into docstring. Use with-current-buffer.
-rw-r--r--lisp/dired.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index b1f33317698..5308cdb7e1a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2120,22 +2120,21 @@ Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress',
2120`uncompress'.") 2120`uncompress'.")
2121 2121
2122(defun dired-mark-pop-up (bufname op-symbol files function &rest args) 2122(defun dired-mark-pop-up (bufname op-symbol files function &rest args)
2123 ;;"Args BUFNAME OP-SYMBOL FILES FUNCTION &rest ARGS. 2123 "Args BUFNAME OP-SYMBOL FILES FUNCTION &rest ARGS.
2124 ;;Return FUNCTION's result on ARGS after popping up a window (in a buffer 2124Return FUNCTION's result on ARGS after popping up a window (in a buffer
2125 ;;named BUFNAME, nil gives \" *Marked Files*\") showing the marked 2125named BUFNAME, nil gives \" *Marked Files*\") showing the marked
2126 ;;files. Uses function `dired-pop-to-buffer' to do that. 2126files. Uses function `dired-pop-to-buffer' to do that.
2127 ;; FUNCTION should not manipulate files. 2127 FUNCTION should not manipulate files.
2128 ;; It should only read input (an argument or confirmation). 2128 It should only read input (an argument or confirmation).
2129 ;;The window is not shown if there is just one file or 2129The window is not shown if there is just one file or
2130 ;; OP-SYMBOL is a member of the list in `dired-no-confirm'. 2130 OP-SYMBOL is a member of the list in `dired-no-confirm'.
2131 ;;FILES is the list of marked files." 2131FILES is the list of marked files."
2132 (or bufname (setq bufname " *Marked Files*")) 2132 (or bufname (setq bufname " *Marked Files*"))
2133 (if (or (eq dired-no-confirm t) 2133 (if (or (eq dired-no-confirm t)
2134 (memq op-symbol dired-no-confirm) 2134 (memq op-symbol dired-no-confirm)
2135 (= (length files) 1)) 2135 (= (length files) 1))
2136 (apply function args) 2136 (apply function args)
2137 (save-excursion 2137 (with-current-buffer (get-buffer-create bufname)
2138 (set-buffer (get-buffer-create bufname))
2139 (erase-buffer) 2138 (erase-buffer)
2140 (dired-format-columns-of-files files) 2139 (dired-format-columns-of-files files)
2141 (remove-text-properties (point-min) (point-max) '(mouse-face))) 2140 (remove-text-properties (point-min) (point-max) '(mouse-face)))