# HG changeset patch # User Stefan Monnier # Date 970702708 0 # Node ID 504f15a7d36de5a165432355d9cdddf6bae54783 # Parent bb6d168a6387d2a547d8e91546252ecbef884c71 (dired-mark-pop-up): Turn comment into docstring. Use with-current-buffer. diff -r bb6d168a6387 -r 504f15a7d36d lisp/dired.el --- a/lisp/dired.el Wed Oct 04 23:35:52 2000 +0000 +++ b/lisp/dired.el Wed Oct 04 23:38:28 2000 +0000 @@ -2120,22 +2120,21 @@ `uncompress'.") (defun dired-mark-pop-up (bufname op-symbol files function &rest args) - ;;"Args BUFNAME OP-SYMBOL FILES FUNCTION &rest ARGS. - ;;Return FUNCTION's result on ARGS after popping up a window (in a buffer - ;;named BUFNAME, nil gives \" *Marked Files*\") showing the marked - ;;files. Uses function `dired-pop-to-buffer' to do that. - ;; FUNCTION should not manipulate files. - ;; It should only read input (an argument or confirmation). - ;;The window is not shown if there is just one file or - ;; OP-SYMBOL is a member of the list in `dired-no-confirm'. - ;;FILES is the list of marked files." + "Args BUFNAME OP-SYMBOL FILES FUNCTION &rest ARGS. +Return FUNCTION's result on ARGS after popping up a window (in a buffer +named BUFNAME, nil gives \" *Marked Files*\") showing the marked +files. Uses function `dired-pop-to-buffer' to do that. + FUNCTION should not manipulate files. + It should only read input (an argument or confirmation). +The window is not shown if there is just one file or + OP-SYMBOL is a member of the list in `dired-no-confirm'. +FILES is the list of marked files." (or bufname (setq bufname " *Marked Files*")) (if (or (eq dired-no-confirm t) (memq op-symbol dired-no-confirm) (= (length files) 1)) (apply function args) - (save-excursion - (set-buffer (get-buffer-create bufname)) + (with-current-buffer (get-buffer-create bufname) (erase-buffer) (dired-format-columns-of-files files) (remove-text-properties (point-min) (point-max) '(mouse-face)))