From 1f4139d5ae9f3c9273e3a2c7db251fb0fc8716af Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 5 Jan 2001 14:41:53 +0000 Subject: [PATCH] (isearch-old-signal-hook): New variable. (isearch-mode): Set signal-hook-function to isearch-done. (isearch-done): Restore old signal-hook-function. ---------------------------- --- lisp/ChangeLog | 4 ++++ lisp/isearch.el | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8c460dc5b9f..a931fbec850 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2001-01-05 Gerd Moellmann + * isearch.el (isearch-old-signal-hook): New variable. + (isearch-mode): Set signal-hook-function to isearch-done. + (isearch-done): Restore old signal-hook-function. + * info.el (Info-fontify-node): Mark one more char as intangible. 2000-01-05 Kenichi Handa diff --git a/lisp/isearch.el b/lisp/isearch.el index a394c47259f..6191c4912f5 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1,6 +1,6 @@ ;;; isearch.el --- incremental search minor mode. -;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1999, 2000 +;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1999, 2000, 2001 ;; Free Software Foundation, Inc. ;; Author: Daniel LaLiberte @@ -271,6 +271,7 @@ Default value, nil, means edit the string instead." (define-key map "\M-\C-r" 'isearch-repeat-backward) (define-key map "\177" 'isearch-delete-char) (define-key map "\C-g" 'isearch-abort) + ;; This assumes \e is the meta-prefix-char. (or (= ?\e meta-prefix-char) (error "Inconsistency in isearch.el")) @@ -403,6 +404,9 @@ Default value, nil, means edit the string instead." ;; isearch is invoked. (defvar isearch-input-method-local-p nil) +;; Value of `signal-hook-function' before setting our own. +(defvar isearch-old-signal-hook nil) + ;; Minor-mode-alist changes - kind of redundant with the ;; echo area, but if isearching in multiple windows, it can be useful. @@ -575,6 +579,8 @@ is treated as a regexp. See \\[isearch-forward] for more info." (run-hooks 'isearch-mode-hook) (add-hook 'mouse-leave-buffer-hook 'isearch-done) + (setq isearch-old-signal-hook signal-hook-function + signal-hook-function 'isearch-done) ;; isearch-mode can be made modal (in the sense of not returning to ;; the calling function until searching is completed) by entering @@ -635,6 +641,8 @@ is treated as a regexp. See \\[isearch-forward] for more info." (setq command-history (cons command command-history)))) (remove-hook 'mouse-leave-buffer-hook 'isearch-done) + (setq signal-hook-function isearch-old-signal-hook) + ;; Called by all commands that terminate isearch-mode. ;; If NOPUSH is non-nil, we don't push the string on the search ring. (setq overriding-terminal-local-map nil) @@ -1460,8 +1468,7 @@ If there is no completion possible, say so and continue searching." (defun isearch-pop-state () (setq isearch-cmds (cdr isearch-cmds)) - (isearch-top-state) - ) + (isearch-top-state)) (defun isearch-push-state () (setq isearch-cmds -- 2.39.2