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, 2003 Free Software Foundation, Inc. |
3 |
|
|
4 |
;; Author: Carsten Dominik <dominik@science.uva.nl> |
;; Author: Carsten Dominik <dominik@science.uva.nl> |
5 |
;; Version: 4.18 |
;; Version: 4.18 |
177 |
" (abbreviate-file-name reftex-last-toc-master))) |
" (abbreviate-file-name reftex-last-toc-master))) |
178 |
|
|
179 |
(if (reftex-use-fonts) |
(if (reftex-use-fonts) |
180 |
(put-text-property 1 (point) 'face reftex-toc-header-face)) |
(put-text-property (point-min) (point) 'face reftex-toc-header-face)) |
181 |
(put-text-property 1 (point) 'intangible t) |
(put-text-property (point-min) (point) 'intangible t) |
182 |
(put-text-property 1 2 'xr-alist xr-alist) |
(put-text-property (point-min) (1+ (point-min)) 'xr-alist xr-alist) |
183 |
|
|
184 |
(setq offset |
(setq offset |
185 |
(reftex-insert-docstruct |
(reftex-insert-docstruct |
268 |
(error t))))) |
(error t))))) |
269 |
|
|
270 |
(defun reftex-re-enlarge () |
(defun reftex-re-enlarge () |
271 |
;; Enlarge windiw to a remembered size |
;; Enlarge window to a remembered size. |
272 |
(if reftex-toc-split-windows-horizontally |
(if reftex-toc-split-windows-horizontally |
273 |
(enlarge-window-horizontally |
(enlarge-window-horizontally |
274 |
(max 0 (- (or reftex-last-window-width (window-width)) |
(max 0 (- (or reftex-last-window-width (window-width)) |
484 |
;; If FINAL is t, stay there |
;; If FINAL is t, stay there |
485 |
;; If FINAL is 'hide, hide the *toc* window. |
;; If FINAL is 'hide, hide the *toc* window. |
486 |
;; Otherwise, move cursor back into *toc* window. |
;; Otherwise, move cursor back into *toc* window. |
487 |
;; NO-REVISIT means don't visit files, just use live biffers. |
;; NO-REVISIT means don't visit files, just use live buffers. |
488 |
;; This function is pretty clever about finding back a section heading, |
;; This function is pretty clever about finding back a section heading, |
489 |
;; even if the buffer is not live, or things like outline, x-symbol etc. |
;; even if the buffer is not live, or things like outline, x-symbol etc. |
490 |
;; have been active. |
;; have been active. |
539 |
((eq final 'hide) |
((eq final 'hide) |
540 |
(reftex-unhighlight 0) |
(reftex-unhighlight 0) |
541 |
(or (one-window-p) (delete-window)) |
(or (one-window-p) (delete-window)) |
542 |
(switch-to-buffer show-buffer) |
;; If `show-window' is still live, show-buffer is already visible |
543 |
|
;; so let's not make it visible in yet-another-window. |
544 |
|
(if (window-live-p show-window) |
545 |
|
(select-window show-window) |
546 |
|
(switch-to-buffer show-buffer)) |
547 |
(reftex-re-enlarge)) |
(reftex-re-enlarge)) |
548 |
(t nil)))) |
(t nil)))) |
549 |
|
|