diff options
| author | Richard M. Stallman | 1995-10-19 00:48:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-19 00:48:12 +0000 |
| commit | 898b9ac102508b56debc10409b2173319abb904e (patch) | |
| tree | 257d159b9c4e90cbcbec6cbf088475da40389af2 | |
| parent | fad7d36167776d51aeb9bca213ed25147aeb116d (diff) | |
| download | emacs-898b9ac102508b56debc10409b2173319abb904e.tar.gz emacs-898b9ac102508b56debc10409b2173319abb904e.zip | |
(tex-start-of-header): Now a regexp.
(tex-end-of-header): Likewise.
(plain-tex-mode, latex-mode, slitex-mode, tex-region): Changed accordingly.
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 62e47a8bbe1..3a28ea73e0e 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -155,10 +155,10 @@ The name of the file, preceded by a blank, will be added to this string.") | |||
| 155 | "String appended after the end of a region sent to TeX by \\[tex-region].") | 155 | "String appended after the end of a region sent to TeX by \\[tex-region].") |
| 156 | 156 | ||
| 157 | (defvar tex-start-of-header nil | 157 | (defvar tex-start-of-header nil |
| 158 | "String used by \\[tex-region] to delimit the start of the file's header.") | 158 | "Regular expression used by \\[tex-region] to find start of file's header.") |
| 159 | 159 | ||
| 160 | (defvar tex-end-of-header nil | 160 | (defvar tex-end-of-header nil |
| 161 | "String used by \\[tex-region] to delimit the end of the file's header.") | 161 | "Regular expression used by \\[tex-region] to find end of file's header.") |
| 162 | 162 | ||
| 163 | (defvar tex-shell-cd-command "cd" | 163 | (defvar tex-shell-cd-command "cd" |
| 164 | "Command to give to shell running TeX to change directory. | 164 | "Command to give to shell running TeX to change directory. |
| @@ -338,8 +338,8 @@ special subshell is initiated, the hook `tex-shell-hook' is run." | |||
| 338 | (setq mode-name "TeX") | 338 | (setq mode-name "TeX") |
| 339 | (setq major-mode 'plain-tex-mode) | 339 | (setq major-mode 'plain-tex-mode) |
| 340 | (setq tex-command tex-run-command) | 340 | (setq tex-command tex-run-command) |
| 341 | (setq tex-start-of-header "%**start of header") | 341 | (setq tex-start-of-header "%\\*\\*start of header") |
| 342 | (setq tex-end-of-header "%**end of header") | 342 | (setq tex-end-of-header "%\\*\\*end of header") |
| 343 | (setq tex-trailer "\\bye\n") | 343 | (setq tex-trailer "\\bye\n") |
| 344 | (run-hooks 'text-mode-hook 'tex-mode-hook 'plain-tex-mode-hook)) | 344 | (run-hooks 'text-mode-hook 'tex-mode-hook 'plain-tex-mode-hook)) |
| 345 | ;;;###autoload | 345 | ;;;###autoload |
| @@ -391,8 +391,8 @@ subshell is initiated, `tex-shell-hook' is run." | |||
| 391 | (setq mode-name "LaTeX") | 391 | (setq mode-name "LaTeX") |
| 392 | (setq major-mode 'latex-mode) | 392 | (setq major-mode 'latex-mode) |
| 393 | (setq tex-command latex-run-command) | 393 | (setq tex-command latex-run-command) |
| 394 | (setq tex-start-of-header "\\documentstyle") | 394 | (setq tex-start-of-header "\\\\documentstyle\\|\\\\documentclass") |
| 395 | (setq tex-end-of-header "\\begin{document}") | 395 | (setq tex-end-of-header "\\\\begin{document}") |
| 396 | (setq tex-trailer "\\end{document}\n") | 396 | (setq tex-trailer "\\end{document}\n") |
| 397 | ;; A line containing just $$ is treated as a paragraph separator. | 397 | ;; A line containing just $$ is treated as a paragraph separator. |
| 398 | ;; A line starting with $$ starts a paragraph, | 398 | ;; A line starting with $$ starts a paragraph, |
| @@ -466,8 +466,8 @@ Entering SliTeX mode runs the hook `text-mode-hook', then the hook | |||
| 466 | (setq mode-name "SliTeX") | 466 | (setq mode-name "SliTeX") |
| 467 | (setq major-mode 'slitex-mode) | 467 | (setq major-mode 'slitex-mode) |
| 468 | (setq tex-command slitex-run-command) | 468 | (setq tex-command slitex-run-command) |
| 469 | (setq tex-start-of-header "\\documentstyle{slides}") | 469 | (setq tex-start-of-header "\\\\documentstyle{slides}\\|\\\\docuentclass{slides}") |
| 470 | (setq tex-end-of-header "\\begin{document}") | 470 | (setq tex-end-of-header "\\\\begin{document}") |
| 471 | (setq tex-trailer "\\end{document}\n") | 471 | (setq tex-trailer "\\end{document}\n") |
| 472 | ;; A line containing just $$ is treated as a paragraph separator. | 472 | ;; A line containing just $$ is treated as a paragraph separator. |
| 473 | ;; A line starting with $$ starts a paragraph, | 473 | ;; A line starting with $$ starts a paragraph, |
| @@ -968,11 +968,11 @@ The value of `tex-command' specifies the command to use to run TeX." | |||
| 968 | (default-directory zap-directory)) | 968 | (default-directory zap-directory)) |
| 969 | (goto-char (point-min)) | 969 | (goto-char (point-min)) |
| 970 | ;; Initialize the temp file with either the header or nothing | 970 | ;; Initialize the temp file with either the header or nothing |
| 971 | (if (search-forward tex-start-of-header search-end t) | 971 | (if (re-search-forward tex-start-of-header search-end t) |
| 972 | (progn | 972 | (progn |
| 973 | (beginning-of-line) | 973 | (beginning-of-line) |
| 974 | (setq hbeg (point)) ;mark beginning of header | 974 | (setq hbeg (point)) ;mark beginning of header |
| 975 | (if (search-forward tex-end-of-header nil t) | 975 | (if (re-search-forward tex-end-of-header nil t) |
| 976 | (progn (forward-line 1) | 976 | (progn (forward-line 1) |
| 977 | (setq hend (point))) ;mark end of header | 977 | (setq hend (point))) ;mark end of header |
| 978 | (setq hbeg (point-min))))) ;no header | 978 | (setq hbeg (point-min))))) ;no header |