diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-09-18 15:35:23 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-09-18 15:35:23 +0000 |
commit | 35a3f9a4b41845d3b99b3c3d1a3e5033403b09cb (patch) | |
tree | 52a654c84a719e2b2a3cc8255144c3e5aff33a4f /lisp/dired-aux.el | |
parent | 8aad0aea8b09d800d5c8805a7766f280d7622991 (diff) | |
download | emacs-35a3f9a4b41845d3b99b3c3d1a3e5033403b09cb.tar.gz |
(dired-query-alist): Remove spurious backslash.
(dired-query): Use read-key.
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r-- | lisp/dired-aux.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 4a7e5956751..0fcefe971b8 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -867,7 +867,7 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.") failures))))) (defvar dired-query-alist - '((?\y . y) (?\040 . y) ; `y' or SPC means accept once + '((?y . y) (?\040 . y) ; `y' or SPC means accept once (?n . n) (?\177 . n) ; `n' or DEL skips once (?! . yes) ; `!' accepts rest (?q . no) (?\e . no) ; `q' or ESC skips rest @@ -876,10 +876,10 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.") ;;;###autoload (defun dired-query (qs-var qs-prompt &rest qs-args) - ;; Query user and return nil or t. - ;; Store answer in symbol VAR (which must initially be bound to nil). - ;; Format PROMPT with ARGS. - ;; Binding variable help-form will help the user who types the help key. + "Query user and return nil or t. +Store answer in symbol VAR (which must initially be bound to nil). +Format PROMPT with ARGS. +Binding variable `help-form' will help the user who types the help key." (let* ((char (symbol-value qs-var)) (action (cdr (assoc char dired-query-alist)))) (cond ((eq 'yes action) @@ -897,13 +897,12 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.") ;; Actually it looks nicer without cursor-in-echo-area - you can ;; look at the dired buffer instead of at the prompt to decide. (apply 'message qprompt qs-args) - (setq char (set qs-var (read-char))) - (while (not (setq elt (assoc char dired-query-alist))) - (message "Invalid char - type %c for help." help-char) + (while (progn (setq char (set qs-var (read-key))) + (not (setq elt (assoc char dired-query-alist)))) + (message "Invalid key - type %c for help." help-char) (ding) (sit-for 1) - (apply 'message qprompt qs-args) - (setq char (set qs-var (read-char)))) + (apply 'message qprompt qs-args)) ;; Display the question with the answer. (message "%s" (concat (apply 'format qprompt qs-args) (char-to-string char))) |