summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorCarsten Dominik <dominik@science.uva.nl>1998-03-06 09:09:20 +0000
committerCarsten Dominik <dominik@science.uva.nl>1998-03-06 09:09:20 +0000
commit0f5769e546c00d37792064e31b8d17d8aadbbd80 (patch)
tree69dcdf14a2f2d7e5ffca1c3bd2f405342ca4ba3f /lisp/textmodes
parente2d99f4a08054f3c20be63003dbb98b08a30c25c (diff)
downloademacs-0f5769e546c00d37792064e31b8d17d8aadbbd80.tar.gz
1998-03-06 Carsten Dominik <cd@delysid.gnu.org>
* (reftex-select-item): A set-buffer in the unwind-protect form makes sure we deinstall in the correct hooks.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/reftex.el15
1 files 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)))