diff options
| author | Richard M. Stallman | 1997-04-13 07:28:48 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-13 07:28:48 +0000 |
| commit | d61140e89d8800ae17aef48fe5d97941ad005a87 (patch) | |
| tree | 78cde07430bb7efcd46668a28cb9c80a7df452ca | |
| parent | ffdd27965e92a992dba4e752c48f4591359960ff (diff) | |
| download | emacs-d61140e89d8800ae17aef48fe5d97941ad005a87.tar.gz emacs-d61140e89d8800ae17aef48fe5d97941ad005a87.zip | |
Add defgroup's; use defcustom for user vars.
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 124 |
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. |
| 40 | You can make this `/tmp' if your TEXINPUTS has no relative directories in it | 59 | You can make this `/tmp' if your TEXINPUTS has no relative directories in it |
| 41 | and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are | 60 | and 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. |
| 47 | If this is non-nil, it should be a regular expression string; | 68 | If this is non-nil, it should be a regular expression string; |
| 48 | if it matches the first line of the file, | 69 | if 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. |
| 54 | The command `tex-buffer' runs TeX on `tex-main-file'if that is non-nil.") | 78 | The 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. |
| 63 | If this string contains an asterisk (`*'), that is replaced by the file name; | 92 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 64 | otherwise, the file name, preceded by blank, is added at the end.") | 93 | otherwise, 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. |
| 69 | If this string contains an asterisk (`*'), that is replaced by the file name; | 100 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 70 | otherwise, the file name, preceded by blank, is added at the end.") | 101 | otherwise, 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. |
| 87 | Combined with `standard-latex-block-names' for minibuffer completion.") | 120 | Combined 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. |
| 92 | If this string contains an asterisk (`*'), that is replaced by the file name; | 127 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 93 | otherwise, the file name, preceded by blank, is added at the end.") | 128 | otherwise, 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. |
| 98 | If this string contains an asterisk (`*'), that is replaced by the file name; | 135 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 99 | otherwise, the file name, preceded by blank, is added at the end.") | 136 | otherwise, 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. |
| 104 | If this string contains an asterisk (`*'), that is replaced by the file name; | 143 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 105 | otherwise, the file name, preceded by blank, is added at the end.") | 144 | otherwise, 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. |
| 110 | If this string contains an asterisk (`*'), that is replaced by the file name; | 151 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 111 | otherwise, the file name, preceded by blank, is added at the end. | 152 | otherwise, 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 | ||
| 120 | would tell \\[tex-print] with a prefix argument to ask you which printer to | 161 | would tell \\[tex-print] with a prefix argument to ask you which printer to |
| 121 | use.") | 162 | use." |
| 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. |
| 126 | If this string contains an asterisk (`*'), that is replaced by the file name; | 170 | If this string contains an asterisk (`*'), that is replaced by the file name; |
| 127 | otherwise, the file name, preceded by blank, is added at the end. | 171 | otherwise, 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 | ||
| 135 | would tell \\[tex-view] to use xdvi under X windows and to use dvi2tty | 179 | would tell \\[tex-view] to use xdvi under X windows and to use dvi2tty |
| 136 | otherwise.") | 180 | otherwise." |
| 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. |
| 141 | Should show the queue(s) that \\[tex-print] puts jobs on.") | 187 | Should 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. |
| 146 | This variable is used when it can't be determined whether the file | 194 | This variable is used when it can't be determined whether the file |
| 147 | is plain TeX or LaTeX or what because the file contains no commands. | 195 | is plain TeX or LaTeX or what because the file contains no commands. |
| 148 | Normally set to either `plain-tex-mode' or `latex-mode'.") | 196 | Normally 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]. |