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 dired.el


From: Chong Yidong
Subject: [Emacs-diffs] emacs/lisp ChangeLog dired-aux.el dired.el
Date: Sun, 08 Nov 2009 00:32:23 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/11/08 00:32:22

Modified files:
        lisp           : ChangeLog dired-aux.el dired.el 

Log message:
        * dired-aux.el (dired-query): Place cursor in echo area and allow
        C-g.
        
        * dired.el (dired-mode-map): Disable dired-maybe-insert-subdir
        menu item if not on a directory (Bug#4701).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16579&r2=1.16580
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/dired-aux.el?cvsroot=emacs&r1=1.195&r2=1.196
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/dired.el?cvsroot=emacs&r1=1.436&r2=1.437

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16579
retrieving revision 1.16580
diff -u -b -r1.16579 -r1.16580
--- ChangeLog   8 Nov 2009 00:03:34 -0000       1.16579
+++ ChangeLog   8 Nov 2009 00:32:18 -0000       1.16580
@@ -1,3 +1,11 @@
+2009-11-08  Chong Yidong  <address@hidden>
+
+       * dired-aux.el (dired-query): Place cursor in echo area and allow
+       C-g.
+
+       * dired.el (dired-mode-map): Disable dired-maybe-insert-subdir
+       menu item if not on a directory (Bug#4701).
+
 2009-11-07  Michael Albinus  <address@hidden>
 
        Sync with Tramp 2.1.17.

Index: dired-aux.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired-aux.el,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -b -r1.195 -r1.196
--- dired-aux.el        4 Oct 2009 12:16:05 -0000       1.195
+++ dired-aux.el        8 Nov 2009 00:32:22 -0000       1.196
@@ -887,22 +887,30 @@
          ((eq 'no action)
           nil)                         ; skip, and don't ask again
          (t;; no lasting effects from last time we asked - ask now
-          (let ((qprompt (concat qs-prompt
+          (let ((cursor-in-echo-area t)
+                (executing-kbd-macro executing-kbd-macro)
+                (qprompt (concat qs-prompt
                                  (if help-form
                                      (format " [Type yn!q or %s] "
                                              (key-description
                                               (char-to-string help-char)))
                                    " [Type y, n, q or !] ")))
-                result elt)
-            ;; Actually it looks nicer without cursor-in-echo-area - you can
-            ;; look at the dired buffer instead of at the prompt to decide.
+                done result elt)
+            (while (not done)
             (apply 'message qprompt qs-args)
-            (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-event)))
+              (if (numberp char)
+                  (cond ((and executing-kbd-macro (= char -1))
+                         ;; read-event returns -1 if we are in a kbd
+                         ;; macro and there are no more events in the
+                         ;; macro.  Attempt to get an event
+                         ;; interactively.
+                         (setq executing-kbd-macro nil))
+                        ((eq (key-binding (vector char)) 'keyboard-quit)
+                         (keyboard-quit))
+                        (t
+                         (setq done (setq elt (assoc char
+                                                     dired-query-alist)))))))
             ;; Display the question with the answer.
             (message "%s" (concat (apply 'format qprompt qs-args)
                              (char-to-string char)))

Index: dired.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired.el,v
retrieving revision 1.436
retrieving revision 1.437
diff -u -b -r1.436 -r1.437
--- dired.el    17 Oct 2009 03:13:54 -0000      1.436
+++ dired.el    8 Nov 2009 00:32:22 -0000       1.437
@@ -1388,8 +1388,9 @@
                  :help "Move to previous directory-file line"))
     (define-key map [menu-bar subdir insert]
       '(menu-item "Insert This Subdir" dired-maybe-insert-subdir
-                 :help "Insert contents of subdirectory"))
-
+                 :help "Insert contents of subdirectory"
+                 :enable (let ((f (dired-get-filename nil t)))
+                           (and f (file-directory-p f)))))
     (define-key map [menu-bar immediate]
       (cons "Immediate" (make-sparse-keymap "Immediate")))
 
@@ -3454,7 +3455,7 @@
 ;;;;;;  dired-run-shell-command dired-do-shell-command 
dired-do-async-shell-command
 ;;;;;;  dired-clean-directory dired-do-print dired-do-touch dired-do-chown
 ;;;;;;  dired-do-chgrp dired-do-chmod dired-compare-directories 
dired-backup-diff
-;;;;;;  dired-diff) "dired-aux" "dired-aux.el" 
"6c7ccd455c2cd50d48164ebd5c52e216")
+;;;;;;  dired-diff) "dired-aux" "dired-aux.el" 
"e207e02ac395d10ee4a09e208081a0ce")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\




reply via email to

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