aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-13 07:28:48 +0000
committerRichard M. Stallman1997-04-13 07:28:48 +0000
commitd61140e89d8800ae17aef48fe5d97941ad005a87 (patch)
tree78cde07430bb7efcd46668a28cb9c80a7df452ca
parentffdd27965e92a992dba4e752c48f4591359960ff (diff)
downloademacs-d61140e89d8800ae17aef48fe5d97941ad005a87.tar.gz
emacs-d61140e89d8800ae17aef48fe5d97941ad005a87.zip
Add defgroup's; use defcustom for user vars.
-rw-r--r--lisp/textmodes/tex-mode.el124
1 files changed, 89 insertions, 35 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index f12047153e4..059d6046e22 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1,6 +1,7 @@
1;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands. 1;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands.
2 2
3;; Copyright (C) 1985, 86, 89, 92, 94, 95, 96 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 86, 89, 92, 94, 95, 96, 1997
4;; Free Software Foundation, Inc.
4 5
5;; Maintainer: FSF 6;; Maintainer: FSF
6;; Keywords: tex 7;; Keywords: tex
@@ -30,44 +31,76 @@
30(require 'shell) 31(require 'shell)
31(require 'compile) 32(require 'compile)
32 33
34(defgroup tex-file nil
35 "TeX files and directories"
36 :prefix "tex-"
37 :group 'tex)
38
39(defgroup tex-run nil
40 "Running external commands from TeX mode"
41 :prefix "tex-"
42 :group 'tex)
43
44(defgroup tex-view nil
45 "Viewing and printing TeX files"
46 :prefix "tex-"
47 :group 'tex)
48
33;;;###autoload 49;;;###autoload
34(defvar tex-shell-file-name nil 50(defcustom tex-shell-file-name nil
35 "*If non-nil, the shell file name to run in the subshell used to run TeX.") 51 "*If non-nil, the shell file name to run in the subshell used to run TeX."
52 :type '(choice (const :tag "None" nil)
53 string)
54 :group 'tex-run)
36 55
37;;;###autoload 56;;;###autoload
38(defvar tex-directory "." 57(defcustom tex-directory "."
39 "*Directory in which temporary files are written. 58 "*Directory in which temporary files are written.
40You can make this `/tmp' if your TEXINPUTS has no relative directories in it 59You can make this `/tmp' if your TEXINPUTS has no relative directories in it
41and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are 60and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are
42`\\input' commands with relative directories.") 61`\\input' commands with relative directories."
62 :type 'directory
63 :group 'tex-file)
43 64
44;;;###autoload 65;;;###autoload
45(defvar tex-first-line-header-regexp nil 66(defcustom tex-first-line-header-regexp nil
46 "Regexp for matching a first line which `tex-region' should include. 67 "Regexp for matching a first line which `tex-region' should include.
47If this is non-nil, it should be a regular expression string; 68If this is non-nil, it should be a regular expression string;
48if it matches the first line of the file, 69if it matches the first line of the file,
49`tex-region' always includes the first line in the TeX run.") 70`tex-region' always includes the first line in the TeX run."
71 :type '(choice (const :tag "None" nil)
72 regexp)
73 :group 'tex-file)
50 74
51;;;###autoload 75;;;###autoload
52(defvar tex-main-file nil 76(defcustom tex-main-file nil
53 "*The main TeX source file which includes this buffer's file. 77 "*The main TeX source file which includes this buffer's file.
54The command `tex-buffer' runs TeX on `tex-main-file'if that is non-nil.") 78The command `tex-buffer' runs TeX on `tex-main-file'if that is non-nil."
79 :type '(choice (const :tag "None" nil)
80 file)
81 :group 'tex-file)
55 82
56;;;###autoload 83;;;###autoload
57(defvar tex-offer-save t 84(defcustom tex-offer-save t
58 "*If non-nil, ask about saving modified buffers before \\[tex-file] is run.") 85 "*If non-nil, ask about saving modified buffers before \\[tex-file] is run."
86 :type 'boolean
87 :group 'tex-file)
59 88
60;;;###autoload 89;;;###autoload
61(defvar tex-run-command "tex" 90(defcustom tex-run-command "tex"
62 "*Command used to run TeX subjob. 91 "*Command used to run TeX subjob.
63If this string contains an asterisk (`*'), that is replaced by the file name; 92If this string contains an asterisk (`*'), that is replaced by the file name;
64otherwise, the file name, preceded by blank, is added at the end.") 93otherwise, the file name, preceded by blank, is added at the end."
94 :type 'string
95 :group 'tex-run)
65 96
66;;;###autoload 97;;;###autoload
67(defvar latex-run-command "latex" 98(defcustom latex-run-command "latex"
68 "*Command used to run LaTeX subjob. 99 "*Command used to run LaTeX subjob.
69If this string contains an asterisk (`*'), that is replaced by the file name; 100If this string contains an asterisk (`*'), that is replaced by the file name;
70otherwise, the file name, preceded by blank, is added at the end.") 101otherwise, the file name, preceded by blank, is added at the end."
102 :type 'string
103 :group 'tex-run)
71 104
72(defvar standard-latex-block-names 105(defvar standard-latex-block-names
73 '("abstract" "array" "center" "description" 106 '("abstract" "array" "center" "description"
@@ -82,30 +115,38 @@ otherwise, the file name, preceded by blank, is added at the end.")
82 "Standard LaTeX block names.") 115 "Standard LaTeX block names.")
83 116
84;;;###autoload 117;;;###autoload
85(defvar latex-block-names nil 118(defcustom latex-block-names nil
86 "*User defined LaTeX block names. 119 "*User defined LaTeX block names.
87Combined with `standard-latex-block-names' for minibuffer completion.") 120Combined with `standard-latex-block-names' for minibuffer completion."
121 :type '(repeat string)
122 :group 'tex-run)
88 123
89;;;###autoload 124;;;###autoload
90(defvar slitex-run-command "slitex" 125(defcustom slitex-run-command "slitex"
91 "*Command used to run SliTeX subjob. 126 "*Command used to run SliTeX subjob.
92If this string contains an asterisk (`*'), that is replaced by the file name; 127If this string contains an asterisk (`*'), that is replaced by the file name;
93otherwise, the file name, preceded by blank, is added at the end.") 128otherwise, the file name, preceded by blank, is added at the end."
129 :type 'string
130 :group 'tex-run)
94 131
95;;;###autoload 132;;;###autoload
96(defvar tex-bibtex-command "bibtex" 133(defcustom tex-bibtex-command "bibtex"
97 "*Command used by `tex-bibtex-file' to gather bibliographic data. 134 "*Command used by `tex-bibtex-file' to gather bibliographic data.
98If this string contains an asterisk (`*'), that is replaced by the file name; 135If this string contains an asterisk (`*'), that is replaced by the file name;
99otherwise, the file name, preceded by blank, is added at the end.") 136otherwise, the file name, preceded by blank, is added at the end."
137 :type 'string
138 :group 'tex-run)
100 139
101;;;###autoload 140;;;###autoload
102(defvar tex-dvi-print-command "lpr -d" 141(defcustom tex-dvi-print-command "lpr -d"
103 "*Command used by \\[tex-print] to print a .dvi file. 142 "*Command used by \\[tex-print] to print a .dvi file.
104If this string contains an asterisk (`*'), that is replaced by the file name; 143If this string contains an asterisk (`*'), that is replaced by the file name;
105otherwise, the file name, preceded by blank, is added at the end.") 144otherwise, the file name, preceded by blank, is added at the end."
145 :type 'string
146 :group 'tex-view)
106 147
107;;;###autoload 148;;;###autoload
108(defvar tex-alt-dvi-print-command "lpr -d" 149(defcustom tex-alt-dvi-print-command "lpr -d"
109 "*Command used by \\[tex-print] with a prefix arg to print a .dvi file. 150 "*Command used by \\[tex-print] with a prefix arg to print a .dvi file.
110If this string contains an asterisk (`*'), that is replaced by the file name; 151If this string contains an asterisk (`*'), that is replaced by the file name;
111otherwise, the file name, preceded by blank, is added at the end. 152otherwise, the file name, preceded by blank, is added at the end.
@@ -118,10 +159,13 @@ for example,
118 '(format \"lpr -P%s\" (read-string \"Use printer: \"))) 159 '(format \"lpr -P%s\" (read-string \"Use printer: \")))
119 160
120would tell \\[tex-print] with a prefix argument to ask you which printer to 161would tell \\[tex-print] with a prefix argument to ask you which printer to
121use.") 162use."
163 :type '(choice (string :tag "Command")
164 (sexp :tag "Expression"))
165 :group 'tex-view)
122 166
123;;;###autoload 167;;;###autoload
124(defvar tex-dvi-view-command nil 168(defcustom tex-dvi-view-command nil
125 "*Command used by \\[tex-view] to display a `.dvi' file. 169 "*Command used by \\[tex-view] to display a `.dvi' file.
126If this string contains an asterisk (`*'), that is replaced by the file name; 170If this string contains an asterisk (`*'), that is replaced by the file name;
127otherwise, the file name, preceded by blank, is added at the end. 171otherwise, the file name, preceded by blank, is added at the end.
@@ -133,27 +177,37 @@ window system being used. For example,
133 (if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\")) 177 (if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\"))
134 178
135would tell \\[tex-view] to use xdvi under X windows and to use dvi2tty 179would tell \\[tex-view] to use xdvi under X windows and to use dvi2tty
136otherwise.") 180otherwise."
181 :type '(choice (const nil) string)
182 :group 'tex-view)
137 183
138;;;###autoload 184;;;###autoload
139(defvar tex-show-queue-command "lpq" 185(defcustom tex-show-queue-command "lpq"
140 "*Command used by \\[tex-show-print-queue] to show the print queue. 186 "*Command used by \\[tex-show-print-queue] to show the print queue.
141Should show the queue(s) that \\[tex-print] puts jobs on.") 187Should show the queue(s) that \\[tex-print] puts jobs on."
188 :type 'string
189 :group 'tex-view)
142 190
143;;;###autoload 191;;;###autoload
144(defvar tex-default-mode 'plain-tex-mode 192(defcustom tex-default-mode 'plain-tex-mode
145 "*Mode to enter for a new file that might be either TeX or LaTeX. 193 "*Mode to enter for a new file that might be either TeX or LaTeX.
146This variable is used when it can't be determined whether the file 194This variable is used when it can't be determined whether the file
147is plain TeX or LaTeX or what because the file contains no commands. 195is plain TeX or LaTeX or what because the file contains no commands.
148Normally set to either `plain-tex-mode' or `latex-mode'.") 196Normally set to either `plain-tex-mode' or `latex-mode'."
197 :type 'function
198 :group 'tex)
149 199
150;;;###autoload 200;;;###autoload
151(defvar tex-open-quote "``" 201(defcustom tex-open-quote "``"
152 "*String inserted by typing \\[tex-insert-quote] to open a quotation.") 202 "*String inserted by typing \\[tex-insert-quote] to open a quotation."
203 :type 'string
204 :group 'tex)
153 205
154;;;###autoload 206;;;###autoload
155(defvar tex-close-quote "''" 207(defcustom tex-close-quote "''"
156 "*String inserted by typing \\[tex-insert-quote] to close a quotation.") 208 "*String inserted by typing \\[tex-insert-quote] to close a quotation."
209 :type 'string
210 :group 'tex)
157 211
158(defvar tex-last-temp-file nil 212(defvar tex-last-temp-file nil
159 "Latest temporary file generated by \\[tex-region] and \\[tex-buffer]. 213 "Latest temporary file generated by \\[tex-region] and \\[tex-buffer].