aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-11 04:51:57 +0000
committerRichard M. Stallman1997-06-11 04:51:57 +0000
commitf52b232edd36b4348aafe5a922857a06eeb8f813 (patch)
tree2e13b2268e24e4d5c433640ac9fd24c29bf878bd
parent025bb6359ec82e2f1d3048d3bd83ebbe0adb0623 (diff)
downloademacs-f52b232edd36b4348aafe5a922857a06eeb8f813.tar.gz
emacs-f52b232edd36b4348aafe5a922857a06eeb8f813.zip
(tex-main-file, outline-minor-mode): Add defvars.
-rw-r--r--lisp/textmodes/reftex.el62
1 files changed, 34 insertions, 28 deletions
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 892f9fba17d..29624af71f1 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -1,4 +1,5 @@
1;; reftex.el --- Minor mode for doing \label, \ref and \cite in LaTeX 1;; reftex.el --- Minor mode for doing \label, \ref and \cite in LaTeX
2
2;; Copyright (c) 1997 Free Software Foundation, Inc. 3;; Copyright (c) 1997 Free Software Foundation, Inc.
3 4
4;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl> 5;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl>
@@ -527,16 +528,16 @@
527 528
528(defcustom reftex-label-alist nil 529(defcustom reftex-label-alist nil
529 "Alist with information on environments for \\label-\\ref use. 530 "Alist with information on environments for \\label-\\ref use.
530See the definition of reftex-label-alist-builtin for examples. This variable 531See the definition of `reftex-label-alist-builtin' for examples. This variable
531should define additions and changes to the default. The only things you MUST 532should define additions and changes to the default. The only things you MUST
532NOT change is that '?s' is the type indicator for section labels and SPACE is 533NOT change is that `?s' is the type indicator for section labels and SPACE is
533for the 'any' label type. These are hard-coded at other places in the code. 534for the 'any' label type. These are hard-coded at other places in the code.
534 535
535Changes to this variable after reftex.el has been loaded become only 536Changes to this variable after RefTeX has been loaded only become
536effective when RefTeX is reset with \\[reftex-reset-mode]. 537effective when RefTeX is reset with \\[reftex-reset-mode].
537 538
538Each list entry is a list describing an environment or macro carrying a 539Each list entry is a list describing an environment or macro carrying a
539label. The elements of each list entry are: 540label. The elements of each list entry are:
540 541
5410. Name of the environment (like \"table\") or macro (like \"\\\\myfig\"). 5420. Name of the environment (like \"table\") or macro (like \"\\\\myfig\").
542 Special names: `section' for section labels, `any' to define a group 543 Special names: `section' for section labels, `any' to define a group
@@ -546,35 +547,36 @@ label. The elements of each list entry are:
546 547
5471. Type indicator character, like ?t. 5481. Type indicator character, like ?t.
548 The type indicator is a single character used in prompts for 549 The type indicator is a single character used in prompts for
549 label types. It must be a printable character. The same character 550 label types. It must be a printable character. The same character
550 may occur several times in this list, to cover cases in which different 551 may occur several times in this list, to cover cases in which different
551 environments carry the same label type (like equation and eqnarray). 552 environments carry the same label type (like equation and eqnarray).
552 553
5532. Label prefix string, like \"tab:\". 5542. Label prefix string, like \"tab:\".
554 The prefix is a short string used as the start of a label. It may be the 555 The prefix is a short string used as the start of a label. It may be the
555 empty string. 556 empty string.
556 557
5573. Format string for reference insert in buffer. Each %s will be replaced by 5583. Format string for reference insert in buffer. Each `%s' will be
558 the label (yes, several %s can be in there, so that you can set this to: 559 replaced by the label (you can use more than one several `%s', so
559 \"\\ref{%s} on page~\\pageref{%s}\"). 560 that you can set this to: \"\\ref{%s} on page~\\pageref{%s}\").
560 When the format starts with ~, whitespace before point will be removed so 561 When the format starts with `~', whitespace before point will be
561 that the reference cannot be separated from the word before it. 562 removed so that the reference cannot be separated from the word
563 before it.
562 564
5634. Indication on how to find the short context. 5654. Indication on how to find the short context.
564 - If `nil', use the text following the \\label{...} macro. 566 - If nil, use the text following the \\label{...} macro.
565 - If `t', use 567 - If t, use
566 - text following the \\begin{...} statement of environments 568 - text following the \\begin{...} statement of environments
567 (not a good choice in in eqnarray or enumerate environments!) 569 (not a good choice in in eqnarray or enumerate environments!)
568 - the section heading for section labels. 570 - the section heading for section labels.
569 - the begin of the macro for macros. 571 - the begin of the macro for macros.
570 - If a string, use as regexp to search *backward* from the label. Context 572 - If a string, use as regexp to search *backward* from the label. Context
571 is then the text following the end of the match. E.g. putting this to 573 is then the text following the end of the match. E.g. putting this to
572 \"\\\\\\\\caption{\" will use the beginning of the caption in a figure 574 \"\\\\\\\\caption{\" will use the beginning of the caption in a figure
573 or table environment. \"\\\\\\\\begin{eqnarray}\\\\|\\\\\\\\\\\\\\\\\" 575 or table environment. \"\\\\\\\\begin{eqnarray}\\\\|\\\\\\\\\\\\\\\\\"
574 works for eqnarrays. 576 works for eqnarrays.
575 - If a function, call this function with the name of the environment/macro 577 - If a function, call this function with the name of the environment/macro
576 as argument. On call, point will be just after the \\label macro. The 578 as argument. On call, point will be just after the \\label macro. The
577 function is expected to return a suitable context string. It should 579 function is expected to return a suitable context string. It should
578 throw an exception (error) when failing to find context. 580 throw an exception (error) when failing to find context.
579 Consider the following example, which would return the 10 characters 581 Consider the following example, which would return the 10 characters
580 following the label as context: 582 following the label as context:
@@ -584,12 +586,12 @@ label. The elements of each list entry are:
584 (buffer-substring (point) (+ 10 (point))) 586 (buffer-substring (point) (+ 10 (point)))
585 (error \"Buffer too small\"))) 587 (error \"Buffer too small\")))
586 588
587 Setting the variable reftex-use-text-after-label-as-context to t overrides 589 Setting the variable `reftex-use-text-after-label-as-context' to t
588 the setting here. 590 overrides the setting here.
589 591
5905. List of magic words which identify a reference to be of this type. If the 5925. List of magic words which identify a reference to be of this type. If the
591 word before point is equal to one of these words when calling 593 word before point is equal to one of these words when calling
592 reftex-reference, the label list offered will be automatically restricted 594 `reftex-reference', the label list offered will be automatically restricted
593 to labels of the correct type. 595 to labels of the correct type.
594 596
595If the type indicator characters of two or more entries are the same, RefTeX 597If the type indicator characters of two or more entries are the same, RefTeX
@@ -597,10 +599,10 @@ will use
597 - the first non-nil format and prefix 599 - the first non-nil format and prefix
598 - the magic words of all involved entries. 600 - the magic words of all involved entries.
599 601
600Any list entry may also be a symbol. If that has an association in 602Any list entry may also be a symbol. If that has an association in
601reftex-label-alist-builtin, the cdr of that association is spliced into the 603reftex-label-alist-builtin, the cdr of that association is spliced into the
602list. See the AMSTeX configuration example in the comment section of 604list. See the AMSTeX configuration example in the comment section of
603reftex.el." 605`reftex.el'."
604 :group 'reftex-defining-label-environments 606 :group 'reftex-defining-label-environments
605 :set 'reftex-set-dirty 607 :set 'reftex-set-dirty
606 :type '(list 608 :type '(list
@@ -1101,10 +1103,14 @@ mode reset is done on the next occasion."
1101 '(reftex-label-numbers-symbol reftex-list-of-labels-symbol 1103 '(reftex-label-numbers-symbol reftex-list-of-labels-symbol
1102 reftex-bibfile-list-symbol)) 1104 reftex-bibfile-list-symbol))
1103 1105
1104;; Silence warnings about TeX-master, which is defined in AUCTeX 1106;; Silence warnings about TeX-master, which is defined in AUCTeX.
1105(defvar TeX-master) 1107(defvar TeX-master)
1106 1108
1107;; Alist connecting master file names with the corresponding lisp symbols 1109;; Silence additional warnings.
1110(defvar tex-main-file)
1111(defvar outline-minor-mode)
1112
1113;; Alist connecting master file names with the corresponding Lisp symbols.
1108(defvar reftex-master-index-list nil) 1114(defvar reftex-master-index-list nil)
1109 1115
1110;; Last index used for a master file 1116;; Last index used for a master file