From: Carsten Dominik Date: Fri, 6 Mar 1998 09:09:20 +0000 (+0000) Subject: 1998-03-06 Carsten Dominik X-Git-Tag: emacs-20.3~1999 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ff44b47b4914cc524f6b1ae4154bf40a1684faf;p=emacs.git 1998-03-06 Carsten Dominik * (reftex-select-item): A set-buffer in the unwind-protect form makes sure we deinstall in the correct hooks. --- 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)))