diff options
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 32 | ||||
| -rw-r--r-- | lisp/dired.el | 7 |
3 files changed, 32 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5e6f2cc1ecc..c150a2084d8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-11-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * dired-aux.el (dired-query): Place cursor in echo area and allow | ||
| 4 | C-g. | ||
| 5 | |||
| 6 | * dired.el (dired-mode-map): Disable dired-maybe-insert-subdir | ||
| 7 | menu item if not on a directory (Bug#4701). | ||
| 8 | |||
| 1 | 2009-11-07 Michael Albinus <michael.albinus@gmx.de> | 9 | 2009-11-07 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 10 | ||
| 3 | Sync with Tramp 2.1.17. | 11 | Sync with Tramp 2.1.17. |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index ce93f01d6ca..95cdc7669bf 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -887,25 +887,33 @@ Binding variable `help-form' will help the user who types the help key." | |||
| 887 | ((eq 'no action) | 887 | ((eq 'no action) |
| 888 | nil) ; skip, and don't ask again | 888 | nil) ; skip, and don't ask again |
| 889 | (t;; no lasting effects from last time we asked - ask now | 889 | (t;; no lasting effects from last time we asked - ask now |
| 890 | (let ((qprompt (concat qs-prompt | 890 | (let ((cursor-in-echo-area t) |
| 891 | (executing-kbd-macro executing-kbd-macro) | ||
| 892 | (qprompt (concat qs-prompt | ||
| 891 | (if help-form | 893 | (if help-form |
| 892 | (format " [Type yn!q or %s] " | 894 | (format " [Type yn!q or %s] " |
| 893 | (key-description | 895 | (key-description |
| 894 | (char-to-string help-char))) | 896 | (char-to-string help-char))) |
| 895 | " [Type y, n, q or !] "))) | 897 | " [Type y, n, q or !] "))) |
| 896 | result elt) | 898 | done result elt) |
| 897 | ;; Actually it looks nicer without cursor-in-echo-area - you can | 899 | (while (not done) |
| 898 | ;; look at the dired buffer instead of at the prompt to decide. | 900 | (apply 'message qprompt qs-args) |
| 899 | (apply 'message qprompt qs-args) | 901 | (setq char (set qs-var (read-event))) |
| 900 | (while (progn (setq char (set qs-var (read-key))) | 902 | (if (numberp char) |
| 901 | (not (setq elt (assoc char dired-query-alist)))) | 903 | (cond ((and executing-kbd-macro (= char -1)) |
| 902 | (message "Invalid key - type %c for help." help-char) | 904 | ;; read-event returns -1 if we are in a kbd |
| 903 | (ding) | 905 | ;; macro and there are no more events in the |
| 904 | (sit-for 1) | 906 | ;; macro. Attempt to get an event |
| 905 | (apply 'message qprompt qs-args)) | 907 | ;; interactively. |
| 908 | (setq executing-kbd-macro nil)) | ||
| 909 | ((eq (key-binding (vector char)) 'keyboard-quit) | ||
| 910 | (keyboard-quit)) | ||
| 911 | (t | ||
| 912 | (setq done (setq elt (assoc char | ||
| 913 | dired-query-alist))))))) | ||
| 906 | ;; Display the question with the answer. | 914 | ;; Display the question with the answer. |
| 907 | (message "%s" (concat (apply 'format qprompt qs-args) | 915 | (message "%s" (concat (apply 'format qprompt qs-args) |
| 908 | (char-to-string char))) | 916 | (char-to-string char))) |
| 909 | (memq (cdr elt) '(t y yes))))))) | 917 | (memq (cdr elt) '(t y yes))))))) |
| 910 | 918 | ||
| 911 | ;;;###autoload | 919 | ;;;###autoload |
diff --git a/lisp/dired.el b/lisp/dired.el index 14fe286c82f..34c17ea4f5d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1388,8 +1388,9 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1388 | :help "Move to previous directory-file line")) | 1388 | :help "Move to previous directory-file line")) |
| 1389 | (define-key map [menu-bar subdir insert] | 1389 | (define-key map [menu-bar subdir insert] |
| 1390 | '(menu-item "Insert This Subdir" dired-maybe-insert-subdir | 1390 | '(menu-item "Insert This Subdir" dired-maybe-insert-subdir |
| 1391 | :help "Insert contents of subdirectory")) | 1391 | :help "Insert contents of subdirectory" |
| 1392 | 1392 | :enable (let ((f (dired-get-filename nil t))) | |
| 1393 | (and f (file-directory-p f))))) | ||
| 1393 | (define-key map [menu-bar immediate] | 1394 | (define-key map [menu-bar immediate] |
| 1394 | (cons "Immediate" (make-sparse-keymap "Immediate"))) | 1395 | (cons "Immediate" (make-sparse-keymap "Immediate"))) |
| 1395 | 1396 | ||
| @@ -3454,7 +3455,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3454 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3455 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3455 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3456 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3456 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3457 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3457 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "6c7ccd455c2cd50d48164ebd5c52e216") | 3458 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "e207e02ac395d10ee4a09e208081a0ce") |
| 3458 | ;;; Generated autoloads from dired-aux.el | 3459 | ;;; Generated autoloads from dired-aux.el |
| 3459 | 3460 | ||
| 3460 | (autoload 'dired-diff "dired-aux" "\ | 3461 | (autoload 'dired-diff "dired-aux" "\ |