From 439f7677e90c6f4dd789b07efd46049c1100d9ed Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 18 Jul 2012 17:27:23 +0800 Subject: [PATCH] Fix usage of C-x 8 key translations in Isearch. * lisp/isearch.el (isearch-mode-map): Handle C-x 8 key translations, and make C-x 8 RET exit isearch. * lisp/international/iso-transl.el: Move isearch-mode-map key definitions to isearch.el. Fixes: debbugs:11439 --- lisp/ChangeLog | 8 ++++++++ lisp/dired.el | 29 ++++++++++++++++++++++++----- lisp/international/iso-transl.el | 6 ------ lisp/isearch.el | 7 +++++++ 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df0bacc3507..b1455a7816a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-07-18 Chong Yidong + + * isearch.el (isearch-mode-map): Handle C-x 8 key translations, + and make C-x 8 RET exit isearch (Bug#11439). + + * international/iso-transl.el: Move isearch-mode-map key + definitions to isearch.el. + 2012-07-18 Stefan Monnier * emacs-lisp/eieio.el: Adapt further to gv.el (bug#11970). diff --git a/lisp/dired.el b/lisp/dired.el index 0e770773197..a80f48fa0c2 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3736,7 +3736,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; 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" "91d39bd8f7e9ce93dc752fe74bea78c2") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "9499f79f5853da0aa93d26465c7bf3a1") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ @@ -3829,15 +3829,24 @@ with a prefix argument. (autoload 'dired-do-async-shell-command "dired-aux" "\ Run a shell command COMMAND on the marked files asynchronously. -Like `dired-do-shell-command' but if COMMAND doesn't end in ampersand, -adds `* &' surrounded by whitespace and executes the command asynchronously. +Like `dired-do-shell-command', but adds `&' at the end of COMMAND +to execute it asynchronously. + +When operating on multiple files, asynchronous commands +are executed in the background on each file in parallel. +In shell syntax this means separating the individual commands +with `&'. However, when COMMAND ends in `;' or `;&' then commands +are executed in the background on each file sequentially waiting +for each command to terminate before running the next command. +In shell syntax this means separating the individual commands with `;'. + The output appears in the buffer `*Async Shell Command*'. \(fn COMMAND &optional ARG FILE-LIST)" t nil) (autoload 'dired-do-shell-command "dired-aux" "\ Run a shell command COMMAND on the marked files. -If no files are marked or a specific numeric prefix arg is given, +If no files are marked or a numeric prefix arg is given, the next ARG files are used. Just \\[universal-argument] means the current file. The prompt mentions the file(s) or the marker, as appropriate. @@ -3859,7 +3868,17 @@ If you want to use `*' as a shell wildcard with whitespace around it, write `*\"\"' in place of just `*'. This is equivalent to just `*' in the shell, but avoids Dired's special handling. -If COMMAND produces output, it goes to a separate buffer. +If COMMAND ends in `&', `;', or `;&', it is executed in the +background asynchronously, and the output appears in the buffer +`*Async Shell Command*'. When operating on multiple files and COMMAND +ends in `&', the shell command is executed on each file in parallel. +However, when COMMAND ends in `;' or `;&' then commands are executed +in the background on each file sequentially waiting for each command +to terminate before running the next command. You can also use +`dired-do-async-shell-command' that automatically adds `&'. + +Otherwise, COMMAND is executed synchronously, and the output +appears in the buffer `*Shell Command Output*'. This feature does not try to redisplay Dired buffers afterward, as there's no telling what files COMMAND may have changed. diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el index 1afe00eeb2e..5d2818888fe 100644 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el @@ -38,7 +38,6 @@ ;;; Code: ;;; Provide some binding for startup: -;;;###autoload (or key-translation-map (setq key-translation-map (make-sparse-keymap))) ;;;###autoload (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) ;;;###autoload (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap) @@ -283,11 +282,6 @@ sequence VECTOR. (VECTOR is normally one character long.)") ;; with a language-specific mapping by using `M-x iso-transl-set-language'. (iso-transl-define-keys iso-transl-char-map) -(define-key isearch-mode-map "\C-x" nil) -(define-key isearch-mode-map [?\C-x t] 'isearch-other-control-char) -(define-key isearch-mode-map "\C-x8" nil) - - (provide 'iso-transl) ;;; iso-transl.el ends here diff --git a/lisp/isearch.el b/lisp/isearch.el index 8fe2aba9499..27185bf3fa6 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -511,6 +511,13 @@ This is like `describe-bindings', but displays only Isearch keys." (define-key map "\M-so" 'isearch-occur) (define-key map "\M-shr" 'isearch-highlight-regexp) + ;; The key translations defined in the C-x 8 prefix should insert + ;; characters into the search string. See iso-transl.el. + (define-key map "\C-x" nil) + (define-key map [?\C-x t] 'isearch-other-control-char) + (define-key map "\C-x8" nil) + (define-key map "\C-x8\r" 'isearch-other-control-char) + map) "Keymap for `isearch-mode'.") -- 2.39.2