1 |
;;; reftex-toc.el --- RefTeX's table of contents mode |
;;; reftex-toc.el --- RefTeX's table of contents mode |
2 |
;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
3 |
|
|
4 |
;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl> |
;; Author: Carsten Dominik <dominik@science.uva.nl> |
5 |
;; Version: 4.16 |
;; Version: 4.17 |
6 |
|
|
7 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
8 |
|
|
72 |
"Stores the file name from which `reftex-toc' was called. For redo command.") |
"Stores the file name from which `reftex-toc' was called. For redo command.") |
73 |
|
|
74 |
(defvar reftex-last-window-height nil) |
(defvar reftex-last-window-height nil) |
75 |
|
(defvar reftex-last-window-width nil) |
76 |
(defvar reftex-toc-include-labels-indicator nil) |
(defvar reftex-toc-include-labels-indicator nil) |
77 |
(defvar reftex-toc-include-index-indicator nil) |
(defvar reftex-toc-include-index-indicator nil) |
78 |
(defvar reftex-toc-max-level-indicator nil) |
(defvar reftex-toc-max-level-indicator nil) |
128 |
(docstruct-symbol reftex-docstruct-symbol) |
(docstruct-symbol reftex-docstruct-symbol) |
129 |
(xr-data (assq 'xr (symbol-value reftex-docstruct-symbol))) |
(xr-data (assq 'xr (symbol-value reftex-docstruct-symbol))) |
130 |
(xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data))) |
(xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data))) |
131 |
(here-I-am (if rebuild |
(here-I-am (if rebuild |
132 |
(get 'reftex-toc :reftex-data) |
(get 'reftex-toc :reftex-data) |
133 |
(car (reftex-where-am-I)))) |
(car (reftex-where-am-I)))) |
134 |
offset) |
offset) |
138 |
(when (or (not reftex-toc-keep-other-windows) |
(when (or (not reftex-toc-keep-other-windows) |
139 |
(< (window-height) (* 2 window-min-height))) |
(< (window-height) (* 2 window-min-height))) |
140 |
(delete-other-windows)) |
(delete-other-windows)) |
141 |
(setq reftex-last-window-height (window-height)) ; remember |
|
142 |
(split-window) |
(setq reftex-last-window-width (window-width) |
143 |
|
reftex-last-window-height (window-height)) ; remember |
144 |
|
(if reftex-toc-split-windows-horizontally |
145 |
|
(split-window-horizontally |
146 |
|
(floor (* (frame-width) reftex-toc-split-windows-horizontally-fraction))) |
147 |
|
(split-window)) |
148 |
|
|
149 |
(let ((default-major-mode 'reftex-toc-mode)) |
(let ((default-major-mode 'reftex-toc-mode)) |
150 |
(switch-to-buffer "*toc*"))) |
(switch-to-buffer "*toc*"))) |
151 |
|
|
244 |
|
|
245 |
(defun reftex-re-enlarge () |
(defun reftex-re-enlarge () |
246 |
;; Enlarge windiw to a remembered size |
;; Enlarge windiw to a remembered size |
247 |
(enlarge-window |
(if reftex-toc-split-windows-horizontally |
248 |
(max 0 (- (or reftex-last-window-height (window-height)) |
(enlarge-window-horizontally |
249 |
(window-height))))) |
(max 0 (- (or reftex-last-window-width (window-width)) |
250 |
|
(window-width)))) |
251 |
|
(enlarge-window |
252 |
|
(max 0 (- (or reftex-last-window-height (window-height)) |
253 |
|
(window-height)))))) |
254 |
|
|
255 |
(defun reftex-toc-show-help () |
(defun reftex-toc-show-help () |
256 |
"Show a summary of special key bindings." |
"Show a summary of special key bindings." |