;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:25:23 2007 ;;; from file /home/cyd/emacs/lisp/textmodes/reftex-toc.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`reftex-toc.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303!\207" [provide reftex-toc require reftex] 2) #@31 Keymap used for *toc* buffer. (defvar reftex-toc-map (make-sparse-keymap) (#$ . 656)) (byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\304\"\210\306B\302\306!\204-\303\306\304\"\210\307B\302\307!\204<\303\307\304\"\210\310B\302\310!\204K\303\310\304\"\210\304\207" [current-load-list reftex-last-window-height default-boundp set-default nil reftex-last-window-width reftex-toc-include-labels-indicator reftex-toc-include-index-indicator reftex-toc-max-level-indicator] 3) #@197 Major mode for managing Table of Contents for LaTeX files. This buffer was created with RefTeX. Press `?' for a summary of important key bindings. Here are all local bindings. \{reftex-toc-map} (defalias 'reftex-toc-mode #[nil "\306 \210\307\310\311\n!\210\312\303!\210\313\312\304!\210\313\312\305!\210\314\312\315!\210\316 \312\317!\210)\320U\2033\321\2027\322)!\323\324\325\326\327 \330\331\315\332\333\334\332\335\317\332\336\257*\313+\312\337!\210\340\341\342\343\313$\210\340\344\345\343\313$\210\346,\n\"\210\347\350!\207" [major-mode mode-name reftex-toc-map transient-mark-mode zmacs-regions revert-buffer-function kill-all-local-variables reftex-toc-mode "TOC" use-local-map make-local-variable t reftex-toc-revert reftex-toc-include-labels-indicator "" reftex-toc-max-level-indicator 100 "ALL" int-to-string "---- " mode-line-buffer-identification " " global-mode-string " (" ")" " L<" ">" " I<" reftex-toc-include-index-indicator " T<" " -%-" reftex-last-follow-point add-hook post-command-hook reftex-toc-post-command-hook nil pre-command-hook reftex-toc-pre-command-hook easy-menu-add run-hooks reftex-toc-mode-hook reftex-toc-max-level mode-line-format truncate-lines reftex-toc-menu] 17 (#$ . 1178) nil]) #@77 Stores the file name from which `reftex-toc' was called. For redo command. (defvar reftex-last-toc-file nil (#$ . 2430)) #@68 Marker which makes it possible to return from toc to old position. (defvar reftex-toc-return-marker (make-marker) (#$ . 2558)) (byte-code "\301B\302\303!\207" [current-load-list reftex-toc-help (lambda (#1=#:defconst-tmp-var) (defconst reftex-toc-help #1#)) " AVAILABLE KEYS IN TOC BUFFER\n ============================\nn / p next-line / previous-line\nSPC Show the corresponding location of the LaTeX document.\nTAB Goto the location and keep the *toc* window.\nRET Goto the location and hide the *toc* window (also on mouse-2).\n< / > Promote / Demote section, or all sections in region.\nC-c > Display Index. With prefix arg, restrict index to current section.\nq / k Hide/Kill *toc* buffer, return to position of reftex-toc command.\nl i c F Toggle display of [l]abels, [i]ndex, [c]ontext, [F]ile borders.\nt Change maximum toc depth (e.g. `3 t' hides levels greater than 3).\nf / g Toggle follow mode / Refresh *toc* buffer.\na / d Toggle auto recenter / Toggle dedicated frame\nr / C-u r Reparse the LaTeX document / Reparse entire LaTeX document.\n. In other window, show position from where `reftex-toc' was called.\nM-% Global search and replace to rename label at point.\nx Switch to TOC of external document (with LaTeX package `xr').\nz Jump to a specific section (e.g. '3 z' goes to section 3)."] 2) #@116 Show the table of contents for the current document. When called with a raw C-u prefix, rescan the document first. (defalias 'reftex-toc #[(&optional rebuild reuse) "\306 \230\203 \203\307\310!\210\311 \306  `\312\223\210\f\203 \313 \203'\314 \210@\204.\312\315 !\210pA'B\316'J\236C\317\311 BCA@B4\320\321!\203W\322\323N\202Z\324 @D\325\326!\203j\326\327 \330\"\202o\331\327 \330\"\312\211EF\332\310G\205\333\"\211F\203\216\334F!\210\202\323H\203\237\335 I\211\\\336\\W\203\242\337 \210\340 J\335 K\204\313L\203\301\341\342\340 M_!!\210\202\313\343\342\335 M_!!\210\344N\345\310!\210)O\344=\204\335\344 \210\346\347!\210B'P\350=\203\360\351\202\362PQ \350=\203\376\351\202\377 R\352 \336U\203W\353\354!\210\312S\355\356\357!\"c\210\360 \203$\361e`\362T$\210\361e`\363\350$\210\361eeT\3644$\210\365A\350P UV\312\211D\317\350& E\366\367!\210\353\370!\210\350S\202\206\371ADP\205b\372\350 U&\206s\373\374D'J#E\375\322\376\377#\210\201X\377!\210\201Y \210\201Z`E\322\376N#\210`\211W.\207" [reftex-last-toc-master current-prefix-arg reftex-last-toc-file reftex-toc-return-marker reftex-toc-follow-mode reftex-toc-include-index-entries reftex-TeX-master-file reftex-erase-buffer "*toc*" buffer-file-name nil 1 reftex-ensure-index-support reftex-access-scan-info xr "" boundp reftex-rebuilding-toc reftex-toc :reftex-data reftex-where-am-I fboundp frame-property selected-frame unsplittable frame-parameter get-buffer-window visible select-window window-height 0 delete-other-windows window-width split-window-horizontally floor split-window-vertically reftex-toc-mode switch-to-buffer make-local-variable reftex-docstruct-symbol t "ALL" buffer-size message "Building *toc* buffer..." format "TABLE-OF-CONTENTS on %s\nSPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help\n------------------------------------------------------------------------------\n" abbreviate-file-name reftex-use-fonts put-text-property face intangible xr-alist reftex-insert-docstruct run-hooks reftex-display-copied-context-hook "Building *toc* buffer...done." reftex-get-offset " " reftex-last-assoc-before-elt toc put :reftex-line 3 reftex-support-index this-buf docstruct-symbol xr-data here-I-am offset toc-window reuse reftex-toc-keep-other-windows window-min-height reftex-last-window-width reftex-last-window-height reftex-toc-split-windows-horizontally reftex-toc-split-windows-fraction default-major-mode major-mode reftex-toc-include-labels reftex-toc-include-labels-indicator reftex-toc-include-index-indicator buffer-read-only reftex-toc-header-face reftex-toc-include-file-boundaries reftex-toc-include-context reftex-last-follow-point goto-line beginning-of-line reftex-find-start-point] 13 (#$ . 4029) nil]) #@78 Display the TOC window and highlight line corresponding to current position. (defalias 'reftex-toc-recenter #[(&optional arg) "p\305 \306\n\307\"\210\310\311`\"\312U\203\"\313\314\315 \"!\210\306\313\307\"\210)`\311V\203L\316`\317\"\204L\f\320>\203L\321\312\322d`T^\323\"\206Be\324`\323\"\206Jd#\210\314\315 \"!*\207" [frame buf arg current-prefix-arg reftex-highlight-selection selected-frame reftex-toc t count-lines 1 2 nil select-window get-buffer-window get-text-property intangible (cursor both) reftex-highlight previous-single-property-change :data next-single-property-change] 6 (#$ . 6845) "P"]) (defalias 'reftex-toc-pre-command-hook #[nil "\300\301!\207" [reftex-unhighlight 0] 2]) (defalias 'reftex-toc-post-command-hook #[nil "\303`\304\"\2038\305\306\307\303`\304\"#\210`\310V\2038\303`\311\"\2048\312>\2038\313\314\315`T\304\"\206.e\316`\304\"\2066d#\210 \250\203A\317\211\207\320 ?\205\\ \205\\\n`\232?\205\\`\211\205\\\321\322\323\217\207" [reftex-highlight-selection reftex-toc-follow-mode reftex-last-follow-point get-text-property :data put reftex-toc :reftex-data 1 intangible (cursor both) reftex-highlight 2 previous-single-property-change next-single-property-change t reftex-toc-dframe-p nil (byte-code "\301\302?\"\207" [reftex-revisit-to-follow reftex-toc-visit-location nil] 3) ((error t))] 6]) (defalias 'reftex-re-enlarge #[nil "\203\303\304 \206\f\305 \305 Z]!\207\306\304\n\206\307 \307 Z]!\207" [reftex-toc-split-windows-horizontally reftex-last-window-width reftex-last-window-height enlarge-window-horizontally 0 window-width enlarge-window window-height] 4]) (defalias 'reftex-toc-dframe-p #[(&optional frame error) "\206\303 \304\305!\203\305\306\"\202\307\306\"\310\232\211\203'\n\203'\302\311!\210 )\207" [frame res error selected-frame fboundp frame-property name frame-parameter "RefTeX TOC Frame" "This frame is view-only. Use `C-c =' to create toc window for commands"] 4]) #@41 Show a summary of special key bindings. (defalias 'reftex-toc-show-help #[nil "\302\303\304\"\210\305\220\306!\221\210\307\305\310\"\210 \205\311\211\207" [reftex-toc-help reftex-toc-follow-mode reftex-toc-dframe-p nil error "*RefTeX Help*" princ reftex-enlarge-to-fit t 1] 3 (#$ . 8815) nil]) #@31 Move to next selectable item. (defalias 'reftex-toc-next #[(&optional arg) "\302\300!\203\303\303m\204\304u\210\305`\306\"\206`b\207" [zmacs-region-stays reftex-callback-fwd boundp t 1 next-single-property-change :data] 3 (#$ . 9119) "p"]) #@35 Move to previous selectable item. (defalias 'reftex-toc-previous #[(&optional arg) "\302\300!\203\303\304\305`\306\"\206`b\207" [zmacs-region-stays reftex-callback-fwd boundp t nil previous-single-property-change :data] 3 (#$ . 9373) "p"]) #@39 Move to next table of contentes line. (defalias 'reftex-toc-next-heading #[(&optional arg) "\302\300!\203\303\304\210\305\306\304\303 $\210\307 \207" [zmacs-region-stays arg boundp t nil re-search-forward "^ " beginning-of-line] 5 (#$ . 9625) "p"]) #@43 Move to previous table of contentes line. (defalias 'reftex-toc-previous-heading #[(&optional arg) "\302\300!\203\303\304\305\306\303 $\207" [zmacs-region-stays arg boundp t re-search-backward "^ " nil] 5 (#$ . 9884) "p"]) #@52 Toggle follow (other window follows with context). (defalias 'reftex-toc-toggle-follow #[nil "\302 ?\211\207" [reftex-last-follow-point reftex-toc-follow-mode -1] 2 (#$ . 10116) nil]) #@54 Toggle inclusion of file boundaries in *toc* buffer. (defalias 'reftex-toc-toggle-file-boundary #[nil "?\301 \207" [reftex-toc-include-file-boundaries reftex-toc-revert] 1 (#$ . 10308) nil]) #@133 Toggle inclusion of labels in *toc* buffer. With prefix ARG, prompt for a label type and include only labels of that specific type. (defalias 'reftex-toc-toggle-labels #[(arg) "\203 \302 \202 ?\303 \207" [arg reftex-toc-include-labels reftex-query-label-type reftex-toc-revert] 1 (#$ . 10508) "P"]) #@134 Toggle inclusion of index in *toc* buffer. With prefix arg, prompt for an index tag and include only entries of that specific index. (defalias 'reftex-toc-toggle-index #[(arg) "\203 \302 \202 ?\303 \207" [arg reftex-toc-include-index-entries reftex-index-select-tag reftex-toc-revert] 1 (#$ . 10819) "P"]) #@119 Toggle inclusion of label context in *toc* buffer. Label context is only displayed when the labels are there as well. (defalias 'reftex-toc-toggle-context #[nil "?\301 \207" [reftex-toc-include-context reftex-toc-revert] 1 (#$ . 11137) nil]) #@217 Set the maximum level of toc lines in this buffer to value of prefix ARG. When no prefix is given, set the max level to a large number, so that all levels are shown. For eaxample, to set the level to 3, type `3 m'. (defalias 'reftex-toc-max-level #[(arg) "\203\n\303!\202 \304\203\305 !\202\306\307 \207" [arg reftex-toc-max-level reftex-toc-max-level-indicator prefix-numeric-value 100 int-to-string "ALL" reftex-toc-revert] 2 (#$ . 11388) "P"]) #@41 View document location in other window. (defalias 'reftex-toc-view-line #[nil "\300\301\302\"\210\303 \207" [reftex-toc-dframe-p nil error reftex-toc-visit-location] 3 (#$ . 11853) nil]) #@66 Go to document location in other window. Hide the *toc* window. (defalias 'reftex-toc-goto-line-and-hide #[nil "\300\301\302\"\210\303\304!\207" [reftex-toc-dframe-p nil error reftex-toc-visit-location hide] 3 (#$ . 12046) nil]) #@62 Go to document location in other window. *toc* window stays. (defalias 'reftex-toc-goto-line #[nil "\300\301\302\"\210\303\304!\207" [reftex-toc-dframe-p nil error reftex-toc-visit-location t] 3 (#$ . 12282) nil]) #@66 Go to document location in other window. Hide the *toc* window. (defalias 'reftex-toc-mouse-goto-line-and-hide #[(ev) "\301!\210\302\303\304\"\210\305\306!\207" [ev mouse-set-point reftex-toc-dframe-p nil error reftex-toc-visit-location hide] 3 (#$ . 12502) "e"]) #@46 Show point where reftex-toc was called from. (defalias 'reftex-toc-show-calling-point #[nil "\302\303\304\"\210\305 \306\216\307\310 !!\210\311 !b\210\312\313!*\207" [this-window reftex-toc-return-marker reftex-toc-dframe-p nil error selected-window ((select-window this-window)) switch-to-buffer-other-window marker-buffer marker-position recenter (4)] 3 (#$ . 12774) nil]) #@135 Hide the *toc* window and do not move point. If the toc window is the only window on the dedicated TOC frame, the frame is destroyed. (defalias 'reftex-toc-quit #[nil "\301 \203\302 \203\303 G\304V\203\305 \207\301 \204\306 \210\307\310!!\210\311 \210\312!\206-`b\207" [reftex-toc-return-marker one-window-p reftex-toc-dframe-p frame-list 1 delete-frame delete-window switch-to-buffer marker-buffer reftex-re-enlarge marker-position] 3 (#$ . 13157) nil]) #@24 Kill the *toc* buffer. (defalias 'reftex-toc-quit-and-kill #[nil "\301\302!\210\303 \204\f\304 \210\305\306!!\210\307 \210\310!b\207" [reftex-toc-return-marker kill-buffer "*toc*" one-window-p delete-window switch-to-buffer marker-buffer reftex-re-enlarge marker-position] 3 (#$ . 13629) nil]) #@176 Display the index buffer for the current document. This works just like `reftex-display-index' from a LaTeX buffer. With prefix arg 1, restrict index to the section at point. (defalias 'reftex-toc-display-index #[(&optional arg) "\306\307\310\"\210\311`\312\"J\307\211\211\313\232\203/\314\315 \f#\316\315 \f>A\"\317 8 \nE\320 \210\321 ?\205: \"-\207" [reftex-docstruct-symbol restr eor bor docstruct data reftex-toc-dframe-p nil error get-text-property :data 2 reftex-last-assoc-before-elt toc assoc 6 reftex-toc-goto-line reftex-display-index arg] 5 (#$ . 13933) "P"]) #@68 Regenerate the *toc* buffer by reparsing file of section at point. (defalias 'reftex-toc-rescan #[(&rest ignore) "\203p \204p\306`\307\"\211@\211\310=\203\311\n8\202< \312>\203(\nA@\202< ;\2033\311\n8\202< \313=\205<\311\n8\314e`\"n\203I\315\202J\316\\\f\204W\317\320!\210\202l\321\322\323 #\210\324\325\f!!\210\326\327\322 \210),\202s\330 \210\331 \207" [reftex-enable-partial-scans current-prefix-arg data what file line get-text-property :data toc 3 (eof bof file-error) index count-lines 1 0 error "Don't know which file to rescan. Try `C-u r'" put reftex-toc :reftex-line switch-to-buffer-other-window reftex-get-file-buffer-force (4) t reftex-toc-Rescan reftex-kill-temporary-buffers reftex-rebuilding-toc] 5 (#$ . 14525) nil]) #@63 Regenerate the *toc* buffer by reparsing the entire document. (defalias 'reftex-toc-Rescan #[(&rest ignore) "\304e`\"n\203\f\305\202 \306\\\307\310\311#\210)\312\313 !!\210\314\315\310 )\207" [line reftex-last-toc-file current-prefix-arg reftex-rebuilding-toc count-lines 1 0 put reftex-toc :reftex-line switch-to-buffer-other-window reftex-get-file-buffer-force (16) t] 4 (#$ . 15289) nil]) #@47 Regenerate the *toc* from the internal lists. (defalias 'reftex-toc-revert #[(&rest ignore) "\304\305!\203\305\306 \301\"\202\307\306 \301\"\310\211\203#\311\312\n!!\210\202)\313\312\n!!\210*\314\315!\210\316\317\310!\207" [reftex-rebuilding-toc unsplittable reftex-last-toc-file current-prefix-arg fboundp frame-property selected-frame frame-parameter t switch-to-buffer reftex-get-file-buffer-force switch-to-buffer-other-window reftex-erase-buffer "*toc*" nil reftex-toc] 4 (#$ . 15693) nil]) #@54 Switch to table of contents of an external document. (defalias 'reftex-toc-external #[(&rest ignore) "\303\304\305\"\210p\306\307\301\"\310 \311\"\312\313\n 8A!\206\305\314!!\210\315 \210p\232\203/\316\317!\2022\316\320!+\207" [old-buf xr-alist xr-index reftex-toc-dframe-p nil error get-text-property 1 reftex-select-external-document 0 switch-to-buffer-other-window reftex-get-file-buffer-force "Cannot switch document" reftex-toc message "" "Switched document"] 4 (#$ . 16204) nil]) #@85 Jump to a specific section. E.g. '3 z' jumps to section 3. Useful for large TOC's. (defalias 'reftex-toc-jump #[(arg) "eb\210\301\302\303\247\203\202\304!\305Q\306\307#\210\310 \207" [arg re-search-forward "^ *" number-to-string 1 " " nil t beginning-of-line] 4 (#$ . 16704) "P"]) #@72 Demote section at point. If region is active, apply to all in region. (defalias 'reftex-toc-demote #[(&optional arg) "\300\301!\207" [reftex-toc-do-promote 1] 2 (#$ . 16998) "p"]) #@73 Promote section at point. If region is active, apply to all in region. (defalias 'reftex-toc-promote #[(&optional arg) "\300\301!\207" [reftex-toc-do-promote -1] 2 (#$ . 17185) "p"]) #@139 Workhorse for reftex-toc-promote and reftex-to-demote. Changes the level of sections in the current region, or just the section at point. (defalias 'reftex-toc-do-promote #[(delta) "\306e`\"n\203\f\307\202 \310\\\311 \205(\212\312 b\210\306e`\"n\203%\307\202&\310\\)` \310V\2035\313\2026\314\315\211\315\211\315\211\315\211\316\317\215\211\205^\320 \210\321!.\f\207" [start-line mark-line start-pos delta pro-or-de beg count-lines 1 0 reftex-region-active-p mark "de" "pro" nil exit (byte-code "\306 \203\307 \204\310 \210\202!`\311 ^`\311 ]\202!``b\210\312`\313\"\211\203M` X\203M\n@\314=\203@\n`B B\315`\313\"\206Hdb\210\202$ \237\fb\210\316 @! G\211%\317V\203m \320\316%S 8!Q\321\322 \"&\203\270&\250\203\205%&W\204\270\323\324\325'\326W\203\223\327\202\224\330%\211\317U\203\240\331\202\241\332%\317U\203\254\333\202\255\334 &!\204\270\335\336!\210\321\337 \"\210\340\213\210\341()\"\210\342\343%\211\317U\203\325\333\202\326\334*$\210\344\207" [beg end data entries start-pos sections reftex-region-active-p reftex-toc-check-docstruct reftex-toc-load-all-files-for-promotion mark get-text-property :data toc next-single-property-change reftex-toc-extract-section-number 1 "-" mapcar reftex-toc-promote-prepare yes-or-no-p format "%s %d toc-entr%s (section%s %s)? " 0 "Promote" "Demote" "y" "ies" "" "s" error "Abort" reftex-toc-promote-action ((reftex-toc-Rescan)) reftex-toc-restore-region message "%d section%s %smoted" nil nsec reftex-toc-confirm-promotion delta start-line mark-line pro-or-de] 8) ding message end entries data sections nsec mpos msg] 4 (#$ . 17376)]) (defalias 'reftex-toc-restore-region #[(point-line &optional mark-line) "\203\n\305!\210`\n\203\305\n!\210\205(\306 !\210\307\310!\203#\310 \207\311\312\211\207" [mark-line mpos point-line mark-active deactivate-mark goto-line set-mark fboundp zmacs-activate-region t nil] 2]) #@295 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. This function prepares everything for the changes, but does not do it. The return value is a list with information needed when doing the promotion/demotion later. (defalias 'reftex-toc-promote-prepare #[(x) "@A\306 8\307 8\310\211\311 !\203X\312 !\203X\212\312 !q\210\313 !b\210\314\315\f!!\203L\316\317!\210\314!\203E\320\321!\202N\322\323!\210\202N\324) \205Z\325 \202Z\325 \326\"A\211 \250?\205s\nb\210\322\327!\"\" \330Y\203\204# \\\202\211 #Z$ \330Y\203\231$\331U\204\247 \330W\205\256$\330U\205\256\322\332!#%\333$#&\203\316&\203\316 &\nF\202\330\nb\210\322\332!#.\f\207" [x data toc-point marker literal load 4 7 nil markerp marker-buffer marker-position looking-at regexp-quote beginning-of-line 1 reftex-match-string 2 error "Something is wrong! Contact maintainer!" t reftex-toc-load-all-files-for-promotion assoc "Cannot %smote special sections" 0 -1 "Cannot %smote \\%s" reftex-toc-newhead-from-alist name reftex-section-regexp name1 reftex-section-levels-all level pro-or-de dummy delta newlevel dummy2 newname] 5 (#$ . 19328)]) #@111 Change the level of a toc entry. DELTA and PRO-OR-DE are assumed to be dynamically scoped into this function. (defalias 'reftex-toc-promote-action #[(x) "@A@\3068\307 8\212\310\f!q\210\311\f!b\210\312\313\314\n!P!\203,\315\316 P!\2020\317\320 \"-\207" [x data name newname marker pro-or-de 2 4 marker-buffer marker-position looking-at "\\([ ]*\\\\\\)" regexp-quote replace-match "\\1" error "Fatal error during %smotion"] 4 (#$ . 20578)]) #@57 Get the numbering of a toc entry, for message purposes. (defalias 'reftex-toc-extract-section-number #[(entry) "\301\302\303@8\"\203\304\305\303@8\"\207\306\207" [entry string-match "\\s-*\\(\\S-+\\)" 2 match-string 1 "?"] 4 (#$ . 21033)]) #@348 Get new heading with level NLEVEL from ALIST. If there are no such entries, return nil. If there are several different entries with same new level, choose the one with the smallest distance to the assocation of HEAD in the alist. This makes it possible for promotion to work several sets of headings, if these sets are sorted blocks in the alist. (defalias 'reftex-toc-newhead-from-alist #[(nlevel head alist) "\306\n \"\211 >G\307\310\n\307 \203B \211\f@A) \232\203;\311 G\fZ!\211\nW\203; @@ \n A\211\204 .\207" [alist al head ass pos dist assoc nil 1000 abs mindist newhead x nlevel] 4 (#$ . 21284)]) #@75 Check if the current docstruct is fully up to date and all files visited. (defalias 'reftex-toc-check-docstruct #[nil "J\305\211\211\306\307\215,\207" [reftex-docstruct-symbol empoint marker entry docstruct nil exit (byte-code "\211A@\211\2035 @\304=\203\305 8\306 8\307\n!\203-\310\n!\203-\311\n! U\204\312\313\314\"\210\202\315\207" [docstruct entry marker empoint toc 4 8 markerp marker-buffer marker-position throw exit nil t] 3)] 4 (#$ . 21916)]) #@317 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 this function. When finished, we exit with an error message. (defalias 'reftex-toc-load-all-files-for-promotion #[nil "\303\304 \210\305 \n\"\210\306\307\310\")\207" [reftex-keep-temporary-buffers start-line mark-line t reftex-toc-Rescan reftex-toc-restore-region throw exit "TOC had to be updated first. Please check selection and repeat the command."] 3 (#$ . 22394)]) #@324 Rename the currently selected label in the *TOC* buffer. This launches a global search and replace in order to rename a label. Renaming a label is hardly ever necessary - the only exeption is after promotion/demotion in connection with a package like fancyref, where the label prefix determines the wording of a reference. (defalias 'reftex-toc-rename-label #[nil "\304`\305\"\211@\306 ;\204\307\310!\210\311\312\313 \"!\314\n J\"\203/\315\312\316 \"!\204/\307\317!\210\212\320\213\210)\321 +\207" [toc label newlabel reftex-docstruct-symbol get-text-property :data nil error "This is not a label entry." read-string format "Rename label \"%s\" to:" assoc y-or-n-p "Label '%s' exists. Use anyway? " "Abort" ((byte-code "\300\301!\210\302\303\304\217\207" [reftex-toc-visit-location t nil (byte-code "\302\303\304!\305Q\306\307 \"\"\207" [label newlabel reftex-query-replace-document "{" regexp-quote "}" format "{%s}"] 5) ((error))] 3)) reftex-toc-rescan] 5 (#$ . 23029) nil]) (defalias 'reftex-toc-visit-location #[(&optional final no-revisit) "\306`\307\"\310 \311\211\311\204\312\313!\210@\300=\203%\314 \"\202\200@\315=\2034\316 \"\202\200@\317>\203r@A@!\" \203O\320!!\203g\321\322!\311\"!\210\"\323=\203be\202cdb\202m\324#!\210\311*\202\200@;\203\200\325$ \326$\310 p\f\204\221\327 !\210\312\330!\210\327 !\210%\326=\203\246\331\332!\210\327\n!\202\317%\333=\203\316\331\332!\210\334 \204\271\335 \210\336\n!\203\305 q\210\202\311\337 !\210\340 \202\317\311-\207" [toc toc-window show-window show-buffer match no-revisit get-text-property :data selected-window nil error "Don't know which toc line to visit" reftex-toc-find-section index reftex-index-show-entry (bof eof) reftex-get-buffer-visiting switch-to-buffer-other-window reftex-get-file-buffer-force bof message reftex-show-label-location t select-window "Cannot find location" reftex-unhighlight 0 hide one-window-p delete-window window-live-p switch-to-buffer reftex-re-enlarge file where reftex-no-follow-message reftex-callback-fwd final] 6]) (defalias 'reftex-toc-find-section #[(toc &optional no-revisit) "\3068\3078\3108\3118\3128\313\n!\203W\314\n!\203W\315\314\n!!\210\316\317!\210\320\n!b\210\321\322\f!!\206\241\321\323\f!!\206\241\321\324\f!!\206\241\321\325\322\326  \"@!\327Q!\202\241!\203b\330 !\203\233\315\331 \317\"!\210 \206neb\210\321\322\f!!\206\241\fG\"\332\322\f!\"\"\206\227\332\323\f!\"\"\206\227\332\324\f!\"\")\202\241\333#!\210\317\211$\203\276\334\224b\210`dU\204\265\335\336!\210\337\334\211\224\334\225p$\210$.\207" [toc file marker level literal emergency-point 3 4 5 7 8 markerp marker-buffer switch-to-buffer-other-window push-mark nil marker-position looking-at regexp-quote reftex-make-regexp-allow-for-ctrl-m reftex-make-desperate-section-regexp "\\\\" rassq "[[{]?" reftex-get-buffer-visiting reftex-get-file-buffer-force reftex-nearest-match message 0 recenter 1 reftex-highlight reftex-section-levels-all no-revisit len reftex-no-follow-message match] 7]) (defalias 'reftex-make-desperate-section-regexp #[(old) "\303\304\"T\305\306\303\304\"TO! \307O\303\310\"\203:\311\224\203)\n\312P\2021\n\313\314\315\"Q\306\225\307O\202\n+\207" [old n new string-match "[[{]" regexp-quote 0 nil "\\([ \n]\\)\\|\\(\\`\\|[ \n ]\\)\\([a-zA-Z0-9]+\\)\\([ \n ]\\|}\\'\\)" 1 "[^\n ]*[\n ]" "[^\n ]*" match-string 3] 6]) (defalias 'reftex-recenter-toc-when-idle #[nil "\303 \304V\205*\205*\305 ?\205*\306\307!\205*\310\311\312\"\205* \313 \230\205*\314\315 )\207" [reftex-mode reftex-last-toc-master current-prefix-arg buffer-size 5 active-minibuffer-window fboundp reftex-toc-mode get-buffer-window "*toc*" visible reftex-TeX-master-file nil reftex-toc-recenter] 3]) #@139 Toggle the automatic recentering of the toc window. When active, leaving point idle will make the toc window jump to the correct section. (defalias 'reftex-toggle-auto-toc-recenter #[nil "\203\302!\210\303\304\305!\207\306 \307\310#\304\311!\207" [reftex-toc-auto-recenter-timer reftex-idle-time cancel-timer nil message "Automatic recentering of toc windwo was turned off" run-with-idle-timer t reftex-recenter-toc-when-idle "Automatic recentering of toc window was turned on"] 4 (#$ . 26813) nil]) #@216 Toggle the display of a separate frame for the TOC. This frame is not used by the `reftex-toc' commands, but it is useful to always show the current section in connection with the option `reftex-auto-recenter-toc'. (defalias 'reftex-toc-toggle-dedicated-frame #[nil "\300\301\215\207" [exit (byte-code "\303 \304\305\306!\203\306\202\307\211A@\211\2030\n \310\"\311\232\203\312 !\210\313\314\304\"\210\202\315 +\207" [frames frame get-frame-prop-func frame-list nil fboundp frame-property frame-parameter name "RefTeX TOC Frame" delete-frame throw exit reftex-make-separate-toc-frame] 3)] 2 (#$ . 27326) nil]) (defalias 'reftex-make-separate-toc-frame #[nil "\306 \307 \310\311\312\"\313 \205\306 \314 !\232??\205X\315\316!\317!\210\320\311!\210\317 !\210\321\322!\2039\322 !\210\202C\321\323!\203C\323 !\210\324\n!\210\f\325=\205X \204T\326 \210\327\330\331\",\207" [current-toc-frame current-toc-window current-window current-frame reftex-auto-recenter-toc reftex-toc-auto-recenter-timer selected-frame selected-window get-buffer-window "*toc*" visible nil window-frame make-frame ((name . "RefTeX TOC Frame") (height . 20) (width . 60) (unsplittable . t) (minibuffer) (default-toolbar-visible-p) (menubar-visible-p) (horizontal-scrollbar-visible-p)) select-frame switch-to-buffer fboundp focus-frame x-focus-frame select-window frame reftex-toggle-auto-toc-recenter add-hook delete-frame-hook reftex-toc-delete-frame-hook] 5]) (defalias 'reftex-toc-delete-frame-hook #[(frame) "\205\f\302 !\205\f\303 \207" [reftex-toc-auto-recenter-timer frame reftex-toc-dframe-p reftex-toggle-auto-toc-recenter] 2]) (byte-code "\306\307\310#\210\306\311\312#\210\313\314\315 $\210\313\316\317 $\210\320\321\n:\2035\n@\306 @ A#\210\nA\211\202*\322\323\321 T\211\fGW\203Y\f H\306\324C!\325#\210\202=+\306\326\327#\207" [reftex-toc-map global-map #:--cl-var-- x #:--cl-vec-- #:--cl-idx-- define-key [(mouse-2)] reftex-toc-mouse-goto-line-and-hide [follow-link] mouse-face substitute-key-definition next-line reftex-toc-next previous-line reftex-toc-previous (("n" . reftex-toc-next) ("p" . reftex-toc-previous) ("?" . reftex-toc-show-help) (" " . reftex-toc-view-line) (" " . reftex-toc-goto-line-and-hide) (" " . reftex-toc-goto-line) (">" . reftex-toc-display-index) ("r" . reftex-toc-rescan) ("R" . reftex-toc-Rescan) ("g" . revert-buffer) ("q" . reftex-toc-quit) ("k" . reftex-toc-quit-and-kill) ("f" . reftex-toc-toggle-follow) ("a" . reftex-toggle-auto-toc-recenter) ("d" . reftex-toc-toggle-dedicated-frame) ("F" . reftex-toc-toggle-file-boundary) ("i" . reftex-toc-toggle-index) ("l" . reftex-toc-toggle-labels) ("t" . reftex-toc-max-level) ("c" . reftex-toc-toggle-context) ("\245" . reftex-toc-rename-label) ("x" . reftex-toc-external) ("z" . reftex-toc-jump) ("." . reftex-toc-show-calling-point) ("" . reftex-toc-next-heading) ("" . reftex-toc-previous-heading) (">" . reftex-toc-demote) ("<" . reftex-toc-promote)) nil "0123456789" -1 vector digit-argument "-" negative-argument key] 5) #@35 Menu for Table of Contents buffer (defvar reftex-toc-menu nil (#$ . 30380)) (easy-menu-do-define 'reftex-toc-menu reftex-toc-map "Menu for Table of Contents buffer" '("TOC" ["Show Location" reftex-toc-view-line t] ["Go To Location" reftex-toc-goto-line t] ["Exit & Go To Location" reftex-toc-goto-line-and-hide t] ["Show Calling Point" reftex-toc-show-calling-point t] ["Quit" reftex-toc-quit t] "--" ("Edit" ["Promote" reftex-toc-promote t] ["Demote" reftex-toc-demote t] ["Rename Label" reftex-toc-rename-label t]) "--" ["Index" reftex-toc-display-index t] ["External Document TOC " reftex-toc-external t] "--" ("Update" ["Rebuilt *toc* Buffer" revert-buffer t] ["Rescan One File" reftex-toc-rescan reftex-enable-partial-scans] ["Rescan Entire Document" reftex-toc-Rescan t]) ("Options" "TOC Items" ["File Boundaries" reftex-toc-toggle-file-boundary :style toggle :selected reftex-toc-include-file-boundaries] ["Labels" reftex-toc-toggle-labels :style toggle :selected reftex-toc-include-labels] ["Index Entries" reftex-toc-toggle-index :style toggle :selected reftex-toc-include-index-entries] ["Context" reftex-toc-toggle-context :style toggle :selected reftex-toc-include-context] "--" ["Follow Mode" reftex-toc-toggle-follow :style toggle :selected reftex-toc-follow-mode] ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle :selected reftex-toc-auto-recenter-timer] ["Dedicated Frame" reftex-toc-toggle-dedicated-frame t]) "--" ["Help" reftex-toc-show-help t]))