[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
asking the user "Compress or uncompress"
From: |
Dan Jacobson |
Subject: |
asking the user "Compress or uncompress" |
Date: |
12 Feb 2001 05:51:01 +0800 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 |
When we hit Z in dired it asks us if we want to "Compress or
uncompress" the file we are on. I thought it would be more
appropriate, since emacs certainly knows more about what it's about to
do, to ask the user "Compress?" or "uncompress?", but not "Compress or
uncompress?" . Or maybe emacs shouldn't ask so early in the process
if it's not clear yet. It should at least see if the filename is has
a .Z or whatever, to better frame its question to the user.
Anyways, I took a very brief look at the code and it seems the
following function, though seeming to be a general function by name,
is slightly inelegant by having some compress specific stuff embedded,
whatever.
(defun dired-mark-confirm (op-symbol arg)
;; Request confirmation from the user that the operation described
;; by OP-SYMBOL is to be performed on the marked files.
;; Confirmation consists in a y-or-n question with a file list
;; pop-up unless OP-SYMBOL is a member of `dired-no-confirm'.
;; The files used are determined by ARG (as in dired-get-marked-files).
(or (eq dired-no-confirm t)
(memq op-symbol dired-no-confirm)
(let ((files (dired-get-marked-files t arg))
(string (if (eq op-symbol 'compress) "Compress or uncompress"
(capitalize (symbol-name op-symbol)))))
(dired-mark-pop-up nil op-symbol files (function y-or-n-p)
(concat string " "
(dired-mark-prompt arg files) "? ")))))
--
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com. 積丹尼
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- asking the user "Compress or uncompress",
Dan Jacobson <=