;;; reftex-toc.el --- RefTeX's table of contents mode
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005,
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Maintainer: auctex-devel@gnu.org
+;; Version: 4.31
;; This file is part of GNU Emacs.
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
"Keymap used for *toc* buffer.")
(defvar reftex-toc-menu)
+(eval-when-compile (defvar zmacs-regions))
+(defvar reftex-last-window-height nil)
+(defvar reftex-last-window-width nil)
+(defvar reftex-toc-include-labels-indicator nil)
+(defvar reftex-toc-include-index-indicator nil)
+(defvar reftex-toc-max-level-indicator nil)
(defun reftex-toc-mode ()
"Major mode for managing Table of Contents for LaTeX files.
(defvar reftex-last-toc-file nil
"Stores the file name from which `reftex-toc' was called. For redo command.")
-(defvar reftex-last-window-height nil)
-(defvar reftex-last-window-width nil)
-(defvar reftex-toc-include-labels-indicator nil)
-(defvar reftex-toc-include-index-indicator nil)
-(defvar reftex-toc-max-level-indicator nil)
(defvar reftex-toc-return-marker (make-marker)
"Marker which makes it possible to return from toc to old position.")
(frame-parameter frame 'name))
"RefTeX TOC Frame")))
(if (and res error)
- (error "This frame is view-only. Use `C-c =' to create toc window for commands."))
+ (error "This frame is view-only. Use `C-c =' to create toc window for commands"))
res))
(defun reftex-toc-show-help ()
;; Promotion/Demotion stuff
+(defvar delta)
+(defvar mpos)
+(defvar pro-or-de)
+(defvar start-pos)
+(defvar start-line)
+(defvar mark-line)
+
(defun reftex-toc-demote (&optional arg)
"Demote section at point. If region is active, apply to all in region."
(interactive "p")
nil))
(if msg (progn (ding) (message msg)))))
-(defvar delta)
-(defvar mpos)
-(defvar pro-or-de)
-(defvar start-pos)
-(defvar start-line)
-(defvar mark-line)
(defun reftex-toc-restore-region (point-line &optional mark-line)
(if mark-line
(setq mark-active t
deactivate-mark nil)))))
+(defvar name1)
+(defvar dummy)
+(defvar dummy2)
+
(defun reftex-toc-promote-prepare (x)
"Look at a toc entry and see if we could pro/demote it.
Expects the level change DELTA to be dynamically scoped into this function.
"Make sure all files of the document are being visited by buffers,
and that the scanning info is absolutely up to date.
We do this by rescanning with reftex-keep-temporary-buffers bound to t.
-The variable PRO-OR-DE is assumed to be dynamically scoped into thes function.
+The variable PRO-OR-DE is assumed to be dynamically scoped into this function.
When finished, we exit with an error message."
(let ((reftex-keep-temporary-buffers t))
(reftex-toc-Rescan)
(reftex-toc-restore-region start-line mark-line)
(throw 'exit
- (format "TOC had to be updated first. Please check selection and repeat the command." pro-or-de))))
+ "TOC had to be updated first. Please check selection and repeat the command.")))
(defun reftex-toc-rename-label ()
"Rename the currently selected label in the *TOC* buffer.
((and (markerp marker) (marker-buffer marker))
;; Buffer is still live and we have the marker. Should be easy.
(switch-to-buffer-other-window (marker-buffer marker))
+ (push-mark nil)
(goto-char (marker-position marker))
(or (looking-at (regexp-quote literal))
(looking-at (reftex-make-regexp-allow-for-ctrl-m literal))
;; Table of Contents map
(define-key reftex-toc-map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
'reftex-toc-mouse-goto-line-and-hide)
+(define-key reftex-toc-map [follow-link] 'mouse-face)
(substitute-key-definition
'next-line 'reftex-toc-next reftex-toc-map global-map)
["Help" reftex-toc-show-help t]))
-;;; reftex-toc.el ends here
\ No newline at end of file
+;;; arch-tag: 92400ce2-0b86-4c89-a606-4ed71acea17e
+;;; reftex-toc.el ends here