Fix usage of C-x 8 key translations in Isearch.
authorChong Yidong <cyd@gnu.org>
Wed, 18 Jul 2012 09:27:23 +0000 (17:27 +0800)
committerChong Yidong <cyd@gnu.org>
Wed, 18 Jul 2012 09:27:23 +0000 (17:27 +0800)
* 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
lisp/dired.el
lisp/international/iso-transl.el
lisp/isearch.el

index df0bacc..b1455a7 100644 (file)
@@ -1,3 +1,11 @@
+2012-07-18  Chong Yidong  <cyd@gnu.org>
+
+       * 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  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/eieio.el: Adapt further to gv.el (bug#11970).
index 0e77077..a80f48f 100644 (file)
@@ -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.
index 1afe00e..5d28188 100644 (file)
@@ -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
index 8fe2aba..27185bf 100644 (file)
@@ -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'.")