;;; reftex-toc.el --- RefTeX's table of contents mode
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005,
+;; 2006, 2007, 2008 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.
;; 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 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; 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.
((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)
;;; arch-tag: 92400ce2-0b86-4c89-a606-4ed71acea17e
-;;; reftex-toc.el ends here
\ No newline at end of file
+;;; reftex-toc.el ends here