emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog dired-aux.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog dired-aux.el
Date: Fri, 18 Sep 2009 15:35:26 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/09/18 15:35:26

Modified files:
        lisp           : ChangeLog dired-aux.el 

Log message:
        (dired-query-alist): Remove spurious backslash.
        (dired-query): Use read-key.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16203&r2=1.16204
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/dired-aux.el?cvsroot=emacs&r1=1.192&r2=1.193

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16203
retrieving revision 1.16204
diff -u -b -r1.16203 -r1.16204
--- ChangeLog   18 Sep 2009 15:33:26 -0000      1.16203
+++ ChangeLog   18 Sep 2009 15:35:23 -0000      1.16204
@@ -1,3 +1,8 @@
+2009-09-18  Stefan Monnier  <address@hidden>
+
+       * dired-aux.el (dired-query-alist): Remove spurious backslash.
+       (dired-query): Use read-key.
+
 2009-09-18  Adrian Robert  <address@hidden>
 
        * cus-start.el (ns-use-qd-smoothing): Remove.

Index: dired-aux.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired-aux.el,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -b -r1.192 -r1.193
--- dired-aux.el        11 Sep 2009 06:50:14 -0000      1.192
+++ dired-aux.el        18 Sep 2009 15:35:25 -0000      1.193
@@ -867,7 +867,7 @@
           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 @@
 
 ;;;###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 @@
             ;; 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)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]