(comint-mode-map): Rebind `M-r' from
authorJuri Linkov <juri@jurta.org>
Mon, 30 Nov 2009 16:11:18 +0000 (16:11 +0000)
committerJuri Linkov <juri@jurta.org>
Mon, 30 Nov 2009 16:11:18 +0000 (16:11 +0000)
`comint-previous-matching-input' to
`comint-history-isearch-backward-regexp'.
Unbind `M-s' to allow global key binding `M-s'.
Add menu items for `comint-history-isearch-backward' and
`comint-history-isearch-backward-regexp'.  (Bug#3746)

admin/FOR-RELEASE
etc/NEWS
lisp/ChangeLog
lisp/comint.el

index 1ed535e..27c15ac 100644 (file)
@@ -81,16 +81,12 @@ and change key bindings where necessary.  The current list of modes:
 2. Minibuffer binds `M-s' to `next-matching-history-element'
    (not useful any more since C-s can now search in the history).
 
-3. Shell mode binds `M-s' to `comint-next-matching-input'.
-   This key binding can be changed later when we will implement
-   incremental search through the shell history.
-
-4. `center-line' in Text mode was already moved to the text formatting
+3. `center-line' in Text mode was already moved to the text formatting
    keymap as `M-o M-s' (thus this binding is not necessary any more
    in `nroff-mode-map' too and can be removed now from the nroff mode
    because it can now use the global key binding `M-o M-s' `center-line').
 
-5. PCL-CVS binds `M-s' to `cvs-status', and log-edit-mode binds it to
+4. PCL-CVS binds `M-s' to `cvs-status', and log-edit-mode binds it to
    `log-edit-comment-search-forward'.  Perhaps search commands
    on the global key binding `M-s' are useless in these modes.
 
index 9fcea9b..4b5e12e 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -301,8 +301,8 @@ Command*'.
 
 *** Isearch searches in the comint/shell input history when the new variable
 `comint-history-isearch' is non-nil.  New commands `comint-history-isearch-backward'
-and `comint-history-isearch-backward-regexp' start Isearch in the input history
-regardless of the value of `comint-history-isearch'.
+and `comint-history-isearch-backward-regexp' (bound to M-r) start Isearch
+in the input history regardless of the value of `comint-history-isearch'.
 
 +++
 *** Autorevert Tail mode now works also for remote files.
index 568f1d3..b7d0064 100644 (file)
@@ -1,3 +1,12 @@
+2009-11-30  Juri Linkov  <juri@jurta.org>
+
+       * comint.el (comint-mode-map): Rebind `M-r' from
+       `comint-previous-matching-input' to
+       `comint-history-isearch-backward-regexp'.
+       Unbind `M-s' to allow global key binding `M-s'.
+       Add menu items for `comint-history-isearch-backward' and
+       `comint-history-isearch-backward-regexp'.  (Bug#3746)
+
 2009-11-30  Juri Linkov  <juri@jurta.org>
 
        * replace.el (perform-replace): Let-bind recenter-last-op to nil.
index c2db9c1..4dbd581 100644 (file)
@@ -62,8 +62,7 @@
 ;;
 ;; M-p    comint-previous-input           Cycle backwards in input history
 ;; M-n    comint-next-input               Cycle forwards
-;; M-r     comint-previous-matching-input  Previous input matching a regexp
-;; M-s     comint-next-matching-input      Next input that matches
+;; M-r     comint-history-isearch-backward-regexp  Isearch input regexp backward
 ;; M-C-l   comint-show-output             Show last batch of process output
 ;; RET    comint-send-input
 ;; C-d    comint-delchar-or-maybe-eof     Delete char unless at end of buff
@@ -446,10 +445,7 @@ executed once when the buffer is created."
     (define-key map "\en"        'comint-next-input)
     (define-key map [C-up]       'comint-previous-input)
     (define-key map [C-down]     'comint-next-input)
-    (define-key map "\er"        'comint-previous-matching-input)
-    ;; FIXME: maybe M-r better to be bound to Isearch comint history?
-    ;; (define-key map "\er"     'comint-history-isearch-backward-regexp)
-    (define-key map "\es"        'comint-next-matching-input)
+    (define-key map "\er"        'comint-history-isearch-backward-regexp)
     (define-key map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input)
     (define-key map [?\C-c ?\M-s] 'comint-next-matching-input-from-input)
     (define-key map "\e\C-l"     'comint-show-output)
@@ -512,6 +508,10 @@ executed once when the buffer is created."
       '("Kill Current Input" . comint-kill-input))
     (define-key map [menu-bar inout copy-input]
       '("Copy Old Input" . comint-copy-old-input))
+    (define-key map [menu-bar inout history-isearch-backward-regexp]
+      '("Isearch Input Regexp Backward..." . comint-history-isearch-backward-regexp))
+    (define-key map [menu-bar inout history-isearch-backward]
+      '("Isearch Input String Backward..." . comint-history-isearch-backward))
     (define-key map [menu-bar inout forward-matching-history]
       '("Forward Matching Input..." . comint-forward-matching-input))
     (define-key map [menu-bar inout backward-matching-history]