From 89101e46acb008f64d2b0c17b627e9af2f5d8cfa Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 4 Oct 2000 23:38:28 +0000 Subject: [PATCH] (dired-mark-pop-up): Turn comment into docstring. Use with-current-buffer. --- lisp/dired.el | 21 ++++++++++----------- 1 file 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', `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))) -- 2.39.2