aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes/reftex-toc.el
diff options
context:
space:
mode:
authorKaroly Lorentey2005-06-15 12:57:51 +0000
committerKaroly Lorentey2005-06-15 12:57:51 +0000
commitef85512e51f043d73788f00a2aed13cccde0682c (patch)
treefc1fa1378533250f260ef8eaa9a84ae882d9df84 /lisp/textmodes/reftex-toc.el
parent8736257554f49445f7b4402ac7a9436b38ce6452 (diff)
parentef88a9999004e6c26148c8d280d6a41f623d7249 (diff)
downloademacs-ef85512e51f043d73788f00a2aed13cccde0682c.tar.gz
emacs-ef85512e51f043d73788f00a2aed13cccde0682c.zip
Merged from miles@gnu.org--gnu-2005 (patch 80-82, 350-422)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-350 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-351 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-352 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-353 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-354 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-355 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-356 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-357 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-358 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-359 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-360 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-361 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-362 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-363 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364 Remove "-face" suffix from widget faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365 Remove "-face" suffix from custom faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366 Remove "-face" suffix from change-log faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367 Remove "-face" suffix from compilation faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368 Remove "-face" suffix from diff-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369 lisp/longlines.el (longlines-visible-face): Face removed * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370 Remove "-face" suffix from woman faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371 Remove "-face" suffix from whitespace-highlight face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372 Remove "-face" suffix from ruler-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373 Remove "-face" suffix from show-paren faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374 Remove "-face" suffix from log-view faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375 Remove "-face" suffix from smerge faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376 Remove "-face" suffix from show-tabs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377 Remove "-face" suffix from highlight-changes faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378 Remove "-face" suffix from and downcase info faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379 Remove "-face" suffix from pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380 Update uses of renamed pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381 Tweak ChangeLog * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-382 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383 Remove "-face" suffix from strokes-char face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384 Remove "-face" suffix from compare-windows face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385 Remove "-face" suffix from calendar faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386 Remove "-face" suffix from diary-button face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387 Remove "-face" suffix from testcover faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388 Remove "-face" suffix from viper faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389 Remove "-face" suffix from org faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390 Remove "-face" suffix from sgml-namespace face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391 Remove "-face" suffix from table-cell face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392 Remove "-face" suffix from tex-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393 Remove "-face" suffix from texinfo-heading face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394 Remove "-face" suffix from flyspell faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-395 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-396 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397 Remove "-face" suffix from gomoku faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398 Remove "-face" suffix from mpuz faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-399 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-400 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-401 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-402 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-403 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-404 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-405 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-407 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408 Remove "-face" suffix from Buffer-menu-buffer face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409 Remove "-face" suffix from antlr-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410 Remove "-face" suffix from ebrowse faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-411 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412 Remove "-face" suffix from flymake faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413 Remove "-face" suffix from idlwave faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414 Remove "-face" suffix from sh-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415 Remove "-face" suffix from vhdl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-416 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417 Remove "-face" suffix from which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418 Remove "-face" suffix from cperl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419 Remove "-face" suffix from ld-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420 Fix cperl-mode font-lock problem * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421 Tweak which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-422 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-80 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-81 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-82 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-350
Diffstat (limited to 'lisp/textmodes/reftex-toc.el')
-rw-r--r--lisp/textmodes/reftex-toc.el50
1 files changed, 25 insertions, 25 deletions
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index b5edba97f4b..e2c58882d2a 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -149,7 +149,7 @@ When called with a raw C-u prefix, rescan the document first."
149 (frame-parameter (selected-frame) 'unsplittable))) 149 (frame-parameter (selected-frame) 'unsplittable)))
150 offset toc-window) 150 offset toc-window)
151 151
152 (if (setq toc-window (get-buffer-window 152 (if (setq toc-window (get-buffer-window
153 "*toc*" 153 "*toc*"
154 (if reuse 'visible))) 154 (if reuse 'visible)))
155 (select-window toc-window) 155 (select-window toc-window)
@@ -165,7 +165,7 @@ When called with a raw C-u prefix, rescan the document first."
165 (split-window-horizontally 165 (split-window-horizontally
166 (floor (* (window-width) 166 (floor (* (window-width)
167 reftex-toc-split-windows-fraction))) 167 reftex-toc-split-windows-fraction)))
168 (split-window-vertically 168 (split-window-vertically
169 (floor (* (window-height) 169 (floor (* (window-height)
170 reftex-toc-split-windows-fraction))))) 170 reftex-toc-split-windows-fraction)))))
171 171
@@ -210,11 +210,11 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
210 reftex-toc-include-context 210 reftex-toc-include-context
211 nil ; counter 211 nil ; counter
212 nil ; commented 212 nil ; commented
213 here-I-am 213 here-I-am
214 "" ; xr-prefix 214 "" ; xr-prefix
215 t ; a toc buffer 215 t ; a toc buffer
216 )) 216 ))
217 217
218 (run-hooks 'reftex-display-copied-context-hook) 218 (run-hooks 'reftex-display-copied-context-hook)
219 (message "Building *toc* buffer...done.") 219 (message "Building *toc* buffer...done.")
220 (setq buffer-read-only t)) 220 (setq buffer-read-only t))
@@ -226,7 +226,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
226 t 226 t
227 reftex-toc-include-index-entries 227 reftex-toc-include-index-entries
228 reftex-toc-include-file-boundaries) 228 reftex-toc-include-file-boundaries)
229 (reftex-last-assoc-before-elt 229 (reftex-last-assoc-before-elt
230 'toc here-I-am 230 'toc here-I-am
231 (symbol-value reftex-docstruct-symbol)))) 231 (symbol-value reftex-docstruct-symbol))))
232 (put 'reftex-toc :reftex-line 3) 232 (put 'reftex-toc :reftex-line 3)
@@ -251,7 +251,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
251 (not (get-text-property (point) 'intangible)) 251 (not (get-text-property (point) 'intangible))
252 (memq reftex-highlight-selection '(cursor both)) 252 (memq reftex-highlight-selection '(cursor both))
253 (reftex-highlight 2 253 (reftex-highlight 2
254 (or (previous-single-property-change 254 (or (previous-single-property-change
255 (min (point-max) (1+ (point))) :data) 255 (min (point-max) (1+ (point))) :data)
256 (point-min)) 256 (point-min))
257 (or (next-single-property-change (point) :data) 257 (or (next-single-property-change (point) :data)
@@ -298,16 +298,16 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
298 (window-height)))))) 298 (window-height))))))
299 299
300(defun reftex-toc-dframe-p (&optional frame error) 300(defun reftex-toc-dframe-p (&optional frame error)
301 ;; Check if FRAME is the dedicated TOC frame. 301 ;; Check if FRAME is the dedicated TOC frame.
302 ;; If yes, and ERROR is non-nil, throw an error. 302 ;; If yes, and ERROR is non-nil, throw an error.
303 (setq frame (or frame (selected-frame))) 303 (setq frame (or frame (selected-frame)))
304 (let ((res (equal 304 (let ((res (equal
305 (if (fboundp 'frame-property) 305 (if (fboundp 'frame-property)
306 (frame-property frame 'name) 306 (frame-property frame 'name)
307 (frame-parameter frame 'name)) 307 (frame-parameter frame 'name))
308 "RefTeX TOC Frame"))) 308 "RefTeX TOC Frame")))
309 (if (and res error) 309 (if (and res error)
310 (error "This frame is view-only. Use `C-c =' to create toc window for commands.")) 310 (error "This frame is view-only. Use `C-c =' to create toc window for commands"))
311 res)) 311 res))
312 312
313(defun reftex-toc-show-help () 313(defun reftex-toc-show-help ()
@@ -327,7 +327,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
327 (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t)) 327 (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
328 (setq reftex-callback-fwd t) 328 (setq reftex-callback-fwd t)
329 (or (eobp) (forward-char 1)) 329 (or (eobp) (forward-char 1))
330 (goto-char (or (next-single-property-change (point) :data) 330 (goto-char (or (next-single-property-change (point) :data)
331 (point)))) 331 (point))))
332(defun reftex-toc-previous (&optional arg) 332(defun reftex-toc-previous (&optional arg)
333 "Move to previous selectable item." 333 "Move to previous selectable item."
@@ -364,7 +364,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
364With prefix ARG, prompt for a label type and include only labels of 364With prefix ARG, prompt for a label type and include only labels of
365that specific type." 365that specific type."
366 (interactive "P") 366 (interactive "P")
367 (setq reftex-toc-include-labels 367 (setq reftex-toc-include-labels
368 (if arg (reftex-query-label-type) 368 (if arg (reftex-query-label-type)
369 (not reftex-toc-include-labels))) 369 (not reftex-toc-include-labels)))
370 (reftex-toc-revert)) 370 (reftex-toc-revert))
@@ -468,7 +468,7 @@ With prefix arg 1, restrict index to the section at point."
468(defun reftex-toc-rescan (&rest ignore) 468(defun reftex-toc-rescan (&rest ignore)
469 "Regenerate the *toc* buffer by reparsing file of section at point." 469 "Regenerate the *toc* buffer by reparsing file of section at point."
470 (interactive) 470 (interactive)
471 (if (and reftex-enable-partial-scans 471 (if (and reftex-enable-partial-scans
472 (null current-prefix-arg)) 472 (null current-prefix-arg))
473 (let* ((data (get-text-property (point) :data)) 473 (let* ((data (get-text-property (point) :data))
474 (what (car data)) 474 (what (car data))
@@ -502,7 +502,7 @@ With prefix arg 1, restrict index to the section at point."
502(defun reftex-toc-revert (&rest ignore) 502(defun reftex-toc-revert (&rest ignore)
503 "Regenerate the *toc* from the internal lists." 503 "Regenerate the *toc* from the internal lists."
504 (interactive) 504 (interactive)
505 (let ((unsplittable 505 (let ((unsplittable
506 (if (fboundp 'frame-property) 506 (if (fboundp 'frame-property)
507 (frame-property (selected-frame) 'unsplittable) 507 (frame-property (selected-frame) 'unsplittable)
508 (frame-parameter (selected-frame) 'unsplittable))) 508 (frame-parameter (selected-frame) 'unsplittable)))
@@ -589,7 +589,7 @@ point."
589 (goto-char start-pos) 589 (goto-char start-pos)
590 (setq sections (reftex-toc-extract-section-number (car entries))) 590 (setq sections (reftex-toc-extract-section-number (car entries)))
591 (if (> (setq nsec (length entries)) 1) 591 (if (> (setq nsec (length entries)) 1)
592 (setq sections 592 (setq sections
593 (concat sections "-" 593 (concat sections "-"
594 (reftex-toc-extract-section-number 594 (reftex-toc-extract-section-number
595 (nth (1- nsec) entries))))) 595 (nth (1- nsec) entries)))))
@@ -614,7 +614,7 @@ point."
614 (save-window-excursion 614 (save-window-excursion
615 (reftex-toc-Rescan)) 615 (reftex-toc-Rescan))
616 (reftex-toc-restore-region start-line mark-line) 616 (reftex-toc-restore-region start-line mark-line)
617 (message "%d section%s %smoted" 617 (message "%d section%s %smoted"
618 nsec (if (= 1 nsec) "" "s") pro-or-de) 618 nsec (if (= 1 nsec) "" "s") pro-or-de)
619 nil)) 619 nil))
620 (if msg (progn (ding) (message msg))))) 620 (if msg (progn (ding) (message msg)))))
@@ -667,7 +667,7 @@ promotion/demotion later."
667 (beginning-of-line 1) 667 (beginning-of-line 1)
668 (if (looking-at reftex-section-regexp) 668 (if (looking-at reftex-section-regexp)
669 (setq name (reftex-match-string 2)) 669 (setq name (reftex-match-string 2))
670 (error "Something is wrong! Contact maintainer!"))) 670 (error "Something is wrong! Contact maintainer!")))
671 ;; Section has changed, request scan and loading 671 ;; Section has changed, request scan and loading
672 ;; We use a variable to delay until after the safe-exc. 672 ;; We use a variable to delay until after the safe-exc.
673 ;; because otherwise we loose the region. 673 ;; because otherwise we loose the region.
@@ -776,7 +776,7 @@ label prefix determines the wording of a reference."
776 (error "This is not a label entry.")) 776 (error "This is not a label entry."))
777 (setq newlabel (read-string (format "Rename label \"%s\" to:" label))) 777 (setq newlabel (read-string (format "Rename label \"%s\" to:" label)))
778 (if (assoc newlabel (symbol-value reftex-docstruct-symbol)) 778 (if (assoc newlabel (symbol-value reftex-docstruct-symbol))
779 (if (not (y-or-n-p 779 (if (not (y-or-n-p
780 (format "Label '%s' exists. Use anyway? " label))) 780 (format "Label '%s' exists. Use anyway? " label)))
781 (error "Abort"))) 781 (error "Abort")))
782 (save-excursion 782 (save-excursion
@@ -786,7 +786,7 @@ label prefix determines the wording of a reference."
786 (reftex-query-replace-document 786 (reftex-query-replace-document
787 (concat "{" (regexp-quote label) "}") 787 (concat "{" (regexp-quote label) "}")
788 (format "{%s}" newlabel)) 788 (format "{%s}" newlabel))
789 (error t)))) 789 (error t))))
790 (reftex-toc-rescan))) 790 (reftex-toc-rescan)))
791 791
792 792
@@ -805,9 +805,9 @@ label prefix determines the wording of a reference."
805 show-window show-buffer match) 805 show-window show-buffer match)
806 806
807 (unless toc (error "Don't know which toc line to visit")) 807 (unless toc (error "Don't know which toc line to visit"))
808 808
809 (cond 809 (cond
810 810
811 ((eq (car toc) 'toc) 811 ((eq (car toc) 'toc)
812 ;; a toc entry 812 ;; a toc entry
813 (setq match (reftex-toc-find-section toc no-revisit))) 813 (setq match (reftex-toc-find-section toc no-revisit)))
@@ -823,7 +823,7 @@ label prefix determines the wording of a reference."
823 (file (nth 1 toc))) 823 (file (nth 1 toc)))
824 (if (or (not no-revisit) (reftex-get-buffer-visiting file)) 824 (if (or (not no-revisit) (reftex-get-buffer-visiting file))
825 (progn 825 (progn
826 (switch-to-buffer-other-window 826 (switch-to-buffer-other-window
827 (reftex-get-file-buffer-force file nil)) 827 (reftex-get-file-buffer-force file nil))
828 (goto-char (if (eq where 'bof) (point-min) (point-max)))) 828 (goto-char (if (eq where 'bof) (point-min) (point-max))))
829 (message reftex-no-follow-message) nil)))) 829 (message reftex-no-follow-message) nil))))
@@ -876,8 +876,8 @@ label prefix determines the wording of a reference."
876 (looking-at (reftex-make-desperate-section-regexp literal)) 876 (looking-at (reftex-make-desperate-section-regexp literal))
877 (looking-at (concat "\\\\" 877 (looking-at (concat "\\\\"
878 (regexp-quote 878 (regexp-quote
879 (car 879 (car
880 (rassq level 880 (rassq level
881 reftex-section-levels-all))) 881 reftex-section-levels-all)))
882 "[[{]?")))) 882 "[[{]?"))))
883 ((or (not no-revisit) 883 ((or (not no-revisit)
@@ -1047,7 +1047,7 @@ always show the current section in connection with the option
1047 (define-key reftex-toc-map (vector (list key)) 'digit-argument)) 1047 (define-key reftex-toc-map (vector (list key)) 'digit-argument))
1048(define-key reftex-toc-map "-" 'negative-argument) 1048(define-key reftex-toc-map "-" 'negative-argument)
1049 1049
1050(easy-menu-define 1050(easy-menu-define
1051 reftex-toc-menu reftex-toc-map 1051 reftex-toc-menu reftex-toc-map
1052 "Menu for Table of Contents buffer" 1052 "Menu for Table of Contents buffer"
1053 '("TOC" 1053 '("TOC"
@@ -1080,7 +1080,7 @@ always show the current section in connection with the option
1080 ["Context" reftex-toc-toggle-context :style toggle 1080 ["Context" reftex-toc-toggle-context :style toggle
1081 :selected reftex-toc-include-context] 1081 :selected reftex-toc-include-context]
1082 "--" 1082 "--"
1083 ["Follow Mode" reftex-toc-toggle-follow :style toggle 1083 ["Follow Mode" reftex-toc-toggle-follow :style toggle
1084 :selected reftex-toc-follow-mode] 1084 :selected reftex-toc-follow-mode]
1085 ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle 1085 ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle
1086 :selected reftex-toc-auto-recenter-timer] 1086 :selected reftex-toc-auto-recenter-timer]