From 5ff44b47b4914cc524f6b1ae4154bf40a1684faf Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 6 Mar 1998 09:09:20 +0000 Subject: [PATCH] 1998-03-06 Carsten Dominik * (reftex-select-item): A set-buffer in the unwind-protect form makes sure we deinstall in the correct hooks. --- lisp/textmodes/reftex.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index fb0e90f69d3..dcb2293a3fd 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1184,7 +1184,7 @@ When nil, follow-mode will be suspended for stuff in unvisited files." ;;; Define the formal stuff for a minor mode named RefTeX. ;;; -;; This file corresponds to RefTeX version 3.18.0.2 +;; This file corresponds to RefTeX version 3.19.0.1 (defvar reftex-mode nil "Determines if RefTeX minor mode is active.") @@ -4651,7 +4651,7 @@ bibliography statement (e.g. if it was changed)." ;; When MATCH-EVERYWHERE is t, searches will also match in non-selectable ;; places. - (let* (ev data last-data callback-fwd) + (let* (ev data last-data callback-fwd (selection-buffer (current-buffer))) (setq ev (catch 'myexit @@ -4689,10 +4689,13 @@ bibliography statement (e.g. if it was changed)." (run-hooks 'post-command-hook) ;; because XEmacs does not do it (recursive-edit)) - (use-local-map nil) - (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t) - (remove-hook 'post-command-hook 'reftex-select-post-command-hook t) - (set-marker reftex-recursive-edit-marker nil))))) + (set-marker reftex-recursive-edit-marker nil) + (save-excursion + (set-buffer selection-buffer) + (use-local-map nil) + (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t) + (remove-hook 'post-command-hook + 'reftex-select-post-command-hook t)))))) (set (make-local-variable 'reftex-last-line) (+ (count-lines (point-min) (point)) (if (bolp) 1 0))) -- 2.39.2