;;; reftex-ref.el --- code to create labels and references with RefTeX
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
file (not (eq t reftex-keep-temporary-buffers)))))
(if (not buf)
(list label typekey "" file comment "LOST LABEL. RESCAN TO FIX.")
- (save-excursion
- (set-buffer buf)
+ (with-current-buffer buf
(save-restriction
(widen)
(goto-char 1)
(delete-other-windows)
(setq reftex-call-back-to-this-buffer buf
reftex-latex-syntax-table (syntax-table))
- (let ((default-major-mode 'reftex-select-label-mode))
- (if reftex-use-multiple-selection-buffers
- (switch-to-buffer-other-window
- (save-excursion
- (set-buffer buf)
- (reftex-make-selection-buffer-name typekey)))
- (switch-to-buffer-other-window "*RefTeX Select*")
- (reftex-erase-buffer)))
+ (if reftex-use-multiple-selection-buffers
+ (switch-to-buffer-other-window
+ (with-current-buffer buf
+ (reftex-make-selection-buffer-name typekey)))
+ (switch-to-buffer-other-window "*RefTeX Select*")
+ (reftex-erase-buffer))
(unless (eq major-mode 'reftex-select-label-mode)
(reftex-select-label-mode))
(add-to-list 'selection-buffers (current-buffer))
-;;; arch-tag: 52f14032-fb76-4d31-954f-750c72415675
+;; arch-tag: 52f14032-fb76-4d31-954f-750c72415675
;;; reftex-ref.el ends here