Mercurial > emacs
comparison lisp/textmodes/tex-mode.el @ 24109:e1e1bb544d84
(latex-run-command): Doc fix.
(tex-command): Doc fix.
(tex-compilation-parse-errors): Doc fix.
(tex-generate-zap-file-name): Don't start the name with -.
(tex-expand-files): Works now also with strings ending with ":".
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 18 Jan 1999 01:18:19 +0000 |
parents | 1f014e9d0768 |
children | 18c751deec0d |
comparison
equal
deleted
inserted
replaced
24108:5f499867bc7e | 24109:e1e1bb544d84 |
---|---|
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, 1997 | 3 ;; Copyright (C) 1985, 86, 89, 92, 94, 95, 96, 97, 1998 |
4 ;; Free Software Foundation, Inc. | 4 ;; Free Software Foundation, Inc. |
5 | 5 |
6 ;; Maintainer: FSF | 6 ;; Maintainer: FSF |
7 ;; Keywords: tex | 7 ;; Keywords: tex |
8 | 8 |
105 | 105 |
106 ;;;###autoload | 106 ;;;###autoload |
107 (defcustom latex-run-command "latex" | 107 (defcustom latex-run-command "latex" |
108 "*Command used to run LaTeX subjob. | 108 "*Command used to run LaTeX subjob. |
109 If this string contains an asterisk (`*'), that is replaced by the file name; | 109 If this string contains an asterisk (`*'), that is replaced by the file name; |
110 otherwise, the file name, preceded by blank, is added at the end." | 110 otherwise the value of `tex-start-options-string' and the file name are added |
111 at the end, with blanks as separators." | |
111 :type 'string | 112 :type 'string |
112 :group 'tex-run) | 113 :group 'tex-run) |
113 | 114 |
114 (defvar standard-latex-block-names | 115 (defvar standard-latex-block-names |
115 '("abstract" "array" "center" "description" | 116 '("abstract" "array" "center" "description" |
223 Deleted when the \\[tex-region] or \\[tex-buffer] is next run, or when the | 224 Deleted when the \\[tex-region] or \\[tex-buffer] is next run, or when the |
224 tex shell terminates.") | 225 tex shell terminates.") |
225 | 226 |
226 (defvar tex-command nil | 227 (defvar tex-command nil |
227 "Command to run TeX. | 228 "Command to run TeX. |
228 The name of the file, preceded by a blank, will be added to this string.") | 229 The usual values are `tex-run-command' and `latex-run-command'. |
230 See the documentations of these variables.") | |
229 | 231 |
230 (defvar tex-trailer nil | 232 (defvar tex-trailer nil |
231 "String appended after the end of a region sent to TeX by \\[tex-region].") | 233 "String appended after the end of a region sent to TeX by \\[tex-region].") |
232 | 234 |
233 (defvar tex-start-of-header nil | 235 (defvar tex-start-of-header nil |
1108 `compilation-error-list'. The function `next-error', assigned to | 1110 `compilation-error-list'. The function `next-error', assigned to |
1109 \\[next-error], takes the next error off the list and visits its location. | 1111 \\[next-error], takes the next error off the list and visits its location. |
1110 | 1112 |
1111 If LIMIT-SEARCH is non-nil, don't bother parsing past that location. | 1113 If LIMIT-SEARCH is non-nil, don't bother parsing past that location. |
1112 If FIND-AT-LEAST is non-nil, don't bother parsing after finding that | 1114 If FIND-AT-LEAST is non-nil, don't bother parsing after finding that |
1115 many new errors. | |
1113 | 1116 |
1114 This function works on TeX compilations only. It is necessary for | 1117 This function works on TeX compilations only. It is necessary for |
1115 that purpose, since TeX does not put file names on the same line as | 1118 that purpose, since TeX does not put file names on the same line as |
1116 line numbers for the errors." | 1119 line numbers for the errors." |
1117 (require 'thingatpt) | 1120 (require 'thingatpt) |
1318 "Generate a unique name suitable for use as a file name." | 1321 "Generate a unique name suitable for use as a file name." |
1319 ;; Include the shell process number and host name | 1322 ;; Include the shell process number and host name |
1320 ;; in case there are multiple shells (for same or different user). | 1323 ;; in case there are multiple shells (for same or different user). |
1321 ;; Dec 1998: There is a report that some versions of xdvi | 1324 ;; Dec 1998: There is a report that some versions of xdvi |
1322 ;; don't work with file names that start with #. | 1325 ;; don't work with file names that start with #. |
1323 (format "-tz#%d%s" | 1326 (format "_TZ_%d-%s" |
1324 (process-id (get-buffer-process "*tex-shell*")) | 1327 (process-id (get-buffer-process "*tex-shell*")) |
1325 (tex-strip-dots (system-name)))) | 1328 (tex-strip-dots (system-name)))) |
1326 | 1329 |
1327 (defun tex-strip-dots (s) | 1330 (defun tex-strip-dots (s) |
1328 (setq s (copy-sequence s)) | 1331 (setq s (copy-sequence s)) |
1337 (while (string-match ":" s start) | 1340 (while (string-match ":" s start) |
1338 (setq elts (cons (substring s start (match-beginning 0)) elts)) | 1341 (setq elts (cons (substring s start (match-beginning 0)) elts)) |
1339 (setq start (match-end 0))) | 1342 (setq start (match-end 0))) |
1340 (or (= start 0) | 1343 (or (= start 0) |
1341 (setq elts (cons (substring s start) elts))) | 1344 (setq elts (cons (substring s start) elts))) |
1342 (mapconcat 'expand-file-name (nreverse elts) ":"))) | 1345 (mapconcat '(lambda (elt) |
1346 (if (= (length elt) 0) elt (expand-file-name elt))) | |
1347 (nreverse elts) ":"))) | |
1343 | 1348 |
1344 (defun tex-shell-running () | 1349 (defun tex-shell-running () |
1345 (and (get-process "tex-shell") | 1350 (and (get-process "tex-shell") |
1346 (eq (process-status (get-process "tex-shell")) 'run))) | 1351 (eq (process-status (get-process "tex-shell")) 'run))) |
1347 | 1352 |