=== modified file 'ChangeLog' *** ChangeLog 2013-04-27 19:30:33 +0000 --- ChangeLog 2013-04-28 22:22:55 +0000 *************** *** 1,3 **** --- 1,15 ---- + 2013-04-28 Tim Daly Jr. + + * comint.el (comint-history-isearch-in-progress): new variable + that lets us detect that an isearch is running over command + history + (comint-previous-matching-input): don't print "History item: N" + messages when called as part of an isearch over history, because + it's too slow and spammy. + (comint-history-isearch-setup, comint-history-isearch-end): toggle + comint-history-isearch-in-progress to indicate search start and + stop + 2013-04-27 Paul Eggert Merge from gnulib, incorporating: === modified file 'lisp/comint.el' *** lisp/comint.el 2013-04-21 03:13:04 +0000 --- lisp/comint.el 2013-04-28 22:01:31 +0000 *************** Moves relative to START, or `comint-inpu *** 1175,1180 **** --- 1175,1183 ---- (process-mark (get-buffer-process (current-buffer)))) (point-max))) + (defvar comint-history-isearch-in-progress nil + "Indicates that a comint history search is currently running.") + (defun comint-previous-matching-input (regexp n) "Search backwards through input history for match for REGEXP. \(Previous history elements are earlier commands.) *************** If N is negative, find the next or Nth n *** 1191,1197 **** (setq comint-stored-incomplete-input (funcall comint-get-old-input))) (setq comint-input-ring-index pos) ! (message "History item: %d" (1+ pos)) (comint-delete-input) (insert (ring-ref comint-input-ring pos))))) --- 1194,1201 ---- (setq comint-stored-incomplete-input (funcall comint-get-old-input))) (setq comint-input-ring-index pos) ! (unless comint-history-isearch-in-progress ! (message "History item: %d" (1+ pos))) (comint-delete-input) (insert (ring-ref comint-input-ring pos))))) *************** Intended to be added to `isearch-mode-ho *** 1433,1439 **** 'comint-history-isearch-wrap) (set (make-local-variable 'isearch-push-state-function) 'comint-history-isearch-push-state) ! (add-hook 'isearch-mode-end-hook 'comint-history-isearch-end nil t))) (defun comint-history-isearch-end () "Clean up the comint after terminating Isearch in comint." --- 1437,1444 ---- 'comint-history-isearch-wrap) (set (make-local-variable 'isearch-push-state-function) 'comint-history-isearch-push-state) ! (add-hook 'isearch-mode-end-hook 'comint-history-isearch-end nil t) ! (setq comint-history-isearch-in-progress t))) (defun comint-history-isearch-end () "Clean up the comint after terminating Isearch in comint." *************** Intended to be added to `isearch-mode-ho *** 1444,1450 **** (setq isearch-message-function nil) (setq isearch-wrap-function nil) (setq isearch-push-state-function nil) ! (remove-hook 'isearch-mode-end-hook 'comint-history-isearch-end t)) (defun comint-goto-input (pos) "Put input history item of the absolute history position POS." --- 1449,1456 ---- (setq isearch-message-function nil) (setq isearch-wrap-function nil) (setq isearch-push-state-function nil) ! (remove-hook 'isearch-mode-end-hook 'comint-history-isearch-end t) ! (setq comint-history-isearch-in-progress nil)) (defun comint-goto-input (pos) "Put input history item of the absolute history position POS."