diff options
| author | Stefan Monnier | 2009-09-18 15:35:23 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-09-18 15:35:23 +0000 |
| commit | 35a3f9a4b41845d3b99b3c3d1a3e5033403b09cb (patch) | |
| tree | 52a654c84a719e2b2a3cc8255144c3e5aff33a4f | |
| parent | 8aad0aea8b09d800d5c8805a7766f280d7622991 (diff) | |
| download | emacs-35a3f9a4b41845d3b99b3c3d1a3e5033403b09cb.tar.gz emacs-35a3f9a4b41845d3b99b3c3d1a3e5033403b09cb.zip | |
(dired-query-alist): Remove spurious backslash.
(dired-query): Use read-key.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1f1444340c5..76144677c87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-09-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * dired-aux.el (dired-query-alist): Remove spurious backslash. | ||
| 4 | (dired-query): Use read-key. | ||
| 5 | |||
| 1 | 2009-09-18 Adrian Robert <Adrian.B.Robert@gmail.com> | 6 | 2009-09-18 Adrian Robert <Adrian.B.Robert@gmail.com> |
| 2 | 7 | ||
| 3 | * cus-start.el (ns-use-qd-smoothing): Remove. | 8 | * cus-start.el (ns-use-qd-smoothing): Remove. |
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.") | |||
| 867 | failures))))) | 867 | failures))))) |
| 868 | 868 | ||
| 869 | (defvar dired-query-alist | 869 | (defvar dired-query-alist |
| 870 | '((?\y . y) (?\040 . y) ; `y' or SPC means accept once | 870 | '((?y . y) (?\040 . y) ; `y' or SPC means accept once |
| 871 | (?n . n) (?\177 . n) ; `n' or DEL skips once | 871 | (?n . n) (?\177 . n) ; `n' or DEL skips once |
| 872 | (?! . yes) ; `!' accepts rest | 872 | (?! . yes) ; `!' accepts rest |
| 873 | (?q . no) (?\e . no) ; `q' or ESC skips rest | 873 | (?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.") | |||
| 876 | 876 | ||
| 877 | ;;;###autoload | 877 | ;;;###autoload |
| 878 | (defun dired-query (qs-var qs-prompt &rest qs-args) | 878 | (defun dired-query (qs-var qs-prompt &rest qs-args) |
| 879 | ;; Query user and return nil or t. | 879 | "Query user and return nil or t. |
| 880 | ;; Store answer in symbol VAR (which must initially be bound to nil). | 880 | Store answer in symbol VAR (which must initially be bound to nil). |
| 881 | ;; Format PROMPT with ARGS. | 881 | Format PROMPT with ARGS. |
| 882 | ;; Binding variable help-form will help the user who types the help key. | 882 | Binding variable `help-form' will help the user who types the help key." |
| 883 | (let* ((char (symbol-value qs-var)) | 883 | (let* ((char (symbol-value qs-var)) |
| 884 | (action (cdr (assoc char dired-query-alist)))) | 884 | (action (cdr (assoc char dired-query-alist)))) |
| 885 | (cond ((eq 'yes action) | 885 | (cond ((eq 'yes action) |
| @@ -897,13 +897,12 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.") | |||
| 897 | ;; Actually it looks nicer without cursor-in-echo-area - you can | 897 | ;; Actually it looks nicer without cursor-in-echo-area - you can |
| 898 | ;; look at the dired buffer instead of at the prompt to decide. | 898 | ;; look at the dired buffer instead of at the prompt to decide. |
| 899 | (apply 'message qprompt qs-args) | 899 | (apply 'message qprompt qs-args) |
| 900 | (setq char (set qs-var (read-char))) | 900 | (while (progn (setq char (set qs-var (read-key))) |
| 901 | (while (not (setq elt (assoc char dired-query-alist))) | 901 | (not (setq elt (assoc char dired-query-alist)))) |
| 902 | (message "Invalid char - type %c for help." help-char) | 902 | (message "Invalid key - type %c for help." help-char) |
| 903 | (ding) | 903 | (ding) |
| 904 | (sit-for 1) | 904 | (sit-for 1) |
| 905 | (apply 'message qprompt qs-args) | 905 | (apply 'message qprompt qs-args)) |
| 906 | (setq char (set qs-var (read-char)))) | ||
| 907 | ;; Display the question with the answer. | 906 | ;; Display the question with the answer. |
| 908 | (message "%s" (concat (apply 'format qprompt qs-args) | 907 | (message "%s" (concat (apply 'format qprompt qs-args) |
| 909 | (char-to-string char))) | 908 | (char-to-string char))) |