From: Juri Linkov Date: Wed, 1 May 2013 08:05:05 +0000 (+0300) Subject: * lisp/comint.el (comint-previous-matching-input): Don't print message X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~329 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9e9be37c1870d81de1c375a6231ea1deec2834b1;p=emacs.git * lisp/comint.el (comint-previous-matching-input): Don't print message "History item: %d" when `isearch-mode' is active. (comint-history-isearch-message): Print message "History item: %d" when `comint-input-ring-index' is not empty and this function is called from `isearch-update' with a nil `ellipsis'. Fixes: debbugs:13223 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index edc75c736ad..cf2ac52dcbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2013-05-01 Juri Linkov + + * comint.el (comint-previous-matching-input): Don't print message + "History item: %d" when `isearch-mode' is active. + (comint-history-isearch-message): Print message "History item: %d" + when `comint-input-ring-index' is not empty and this function is + called from `isearch-update' with a nil `ellipsis'. (Bug#13223) + 2013-05-01 Leo Liu * progmodes/octave.el (octave-abbrev-table): Remove abbrev diff --git a/lisp/comint.el b/lisp/comint.el index d5d95f8cbc0..d0c2e477d5a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1191,7 +1191,8 @@ If N is negative, find the next or Nth next match." (setq comint-stored-incomplete-input (funcall comint-get-old-input))) (setq comint-input-ring-index pos) - (message "History item: %d" (1+ pos)) + (unless isearch-mode + (message "History item: %d" (1+ pos))) (comint-delete-input) (insert (ring-ref comint-input-ring pos))))) @@ -1540,8 +1541,11 @@ the function `isearch-message'." (overlay-put comint-history-isearch-message-overlay 'evaporate t)) (overlay-put comint-history-isearch-message-overlay 'display (isearch-message-prefix c-q-hack ellipsis)) - ;; And clear any previous isearch message. - (message ""))) + (if (and comint-input-ring-index (not ellipsis)) + ;; Display the current history index. + (message "History item: %d" (1+ comint-input-ring-index)) + ;; Or clear a previous isearch message. + (message "")))) (defun comint-history-isearch-wrap () "Wrap the input history search when search fails.