From: Juri Linkov Date: Mon, 30 Nov 2009 16:11:18 +0000 (+0000) Subject: (comint-mode-map): Rebind `M-r' from X-Git-Tag: emacs-pretest-23.1.90~164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f9689eba0a69231e7049b8d747e256ffc4985d1;p=emacs.git (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) --- diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 1ed535e2ea7..27c15ac5a84 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -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. diff --git a/etc/NEWS b/etc/NEWS index 9fcea9b23ef..4b5e12e5b0c 100644 --- 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. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 568f1d30c86..b7d0064f56d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2009-11-30 Juri Linkov + + * 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 * replace.el (perform-replace): Let-bind recenter-last-op to nil. diff --git a/lisp/comint.el b/lisp/comint.el index c2db9c13a70..4dbd58144ea 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -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]