diff options
| author | Richard M. Stallman | 1994-01-03 11:36:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-03 11:36:14 +0000 |
| commit | ab2c9f5425adf175b55bbedfee929b389605b779 (patch) | |
| tree | d75e06ab13b8c81e1c8a9e5f542cbf987cdcaa50 | |
| parent | 7d5d472e5c465c0bee3717a2158dbbed30ff97eb (diff) | |
| download | emacs-ab2c9f5425adf175b55bbedfee929b389605b779.tar.gz emacs-ab2c9f5425adf175b55bbedfee929b389605b779.zip | |
(slitex-mode, latex-mode): Set paragraph-start and
paragraph-separate to a specific list of control sequences.
(tex-common-initialization): Make paragraph-start
and paragraph-separate match a line of $$.
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 1f9ad2c51e3..55fe70fc1d6 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -382,6 +382,27 @@ subshell is initiated, the value of tex-shell-hook is called." | |||
| 382 | (setq tex-start-of-header "\\documentstyle") | 382 | (setq tex-start-of-header "\\documentstyle") |
| 383 | (setq tex-end-of-header "\\begin{document}") | 383 | (setq tex-end-of-header "\\begin{document}") |
| 384 | (setq tex-trailer "\\end{document}\n") | 384 | (setq tex-trailer "\\end{document}\n") |
| 385 | ;; A line containing just $$ is treated as a paragraph separator. | ||
| 386 | ;; A line starting with $$ starts a paragraph, | ||
| 387 | ;; but does not separate paragraphs if it has more stuff on it. | ||
| 388 | (setq paragraph-start "^[ \t]*$\\|^[\f%]\\|^[ \t]*\\$\\$\\|\ | ||
| 389 | ^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\ | ||
| 390 | ^\\\\chapter\\>\\|^\\\\section\\>\\|\ | ||
| 391 | ^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\ | ||
| 392 | ^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\ | ||
| 393 | ^\\\\item\\>\\|^\\\\bibitem\\>\\|^\\\\newline\\>\\|^\\\\noindent\\>\\|\ | ||
| 394 | ^\\\\[a-z]*space\\>\\|^\\\\[a-z]*skip\\>\\|\ | ||
| 395 | ^\\\\newpage\\>\\|^\\\\[a-z]*page\\|^\\\\footnote\\>\\|\ | ||
| 396 | ^\\\\marginpar\\>\\|^\\\\parbox\\>\\|^\\\\caption\\>") | ||
| 397 | (setq paragraph-separate "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$\\|\ | ||
| 398 | ^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\ | ||
| 399 | ^\\\\chapter\\>\\|^\\\\section\\>\\|\ | ||
| 400 | ^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\ | ||
| 401 | ^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\ | ||
| 402 | ^\\\\item[ \t]*$\\|^\\\\bibitem[ \t]*$\\|^\\\\newline[ \t]*$\\|^\\\\noindent[ \t]*$\\|\ | ||
| 403 | ^\\\\[a-z]*space[ \t]*$\\|^\\\\[a-z]*skip[ \t]*$\\|\ | ||
| 404 | ^\\\\newpage[ \t]*$\\|^\\\\[a-z]*page[a-z]*[ \t]*$\\|^\\\\footnote[ \t]*$\\|\ | ||
| 405 | ^\\\\marginpar[ \t]*$\\|^\\\\parbox[ \t]*$\\|^\\\\caption[ \t]*$") | ||
| 385 | (run-hooks 'text-mode-hook 'tex-mode-hook 'latex-mode-hook)) | 406 | (run-hooks 'text-mode-hook 'tex-mode-hook 'latex-mode-hook)) |
| 386 | 407 | ||
| 387 | ;;;###autoload | 408 | ;;;###autoload |
| @@ -434,6 +455,27 @@ Entering SliTeX mode calls the value of `text-mode-hook', then the value of | |||
| 434 | (setq tex-start-of-header "\\documentstyle{slides}") | 455 | (setq tex-start-of-header "\\documentstyle{slides}") |
| 435 | (setq tex-end-of-header "\\begin{document}") | 456 | (setq tex-end-of-header "\\begin{document}") |
| 436 | (setq tex-trailer "\\end{document}\n") | 457 | (setq tex-trailer "\\end{document}\n") |
| 458 | ;; A line containing just $$ is treated as a paragraph separator. | ||
| 459 | ;; A line starting with $$ starts a paragraph, | ||
| 460 | ;; but does not separate paragraphs if it has more stuff on it. | ||
| 461 | (setq paragraph-start "^[ \t]*$\\|^[\f%]\\|^[ \t]*\\$\\$\\|\ | ||
| 462 | ^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\ | ||
| 463 | ^\\\\chapter\\>\\|^\\\\section\\>\\|\ | ||
| 464 | ^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\ | ||
| 465 | ^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\ | ||
| 466 | ^\\\\item\\>\\|^\\\\bibitem\\>\\|^\\\\newline\\>\\|^\\\\noindent\\>\\|\ | ||
| 467 | ^\\\\[a-z]*space\\>\\|^\\\\[a-z]*skip\\>\\|\ | ||
| 468 | ^\\\\newpage\\>\\|^\\\\[a-z]*page\\|^\\\\footnote\\>\\|\ | ||
| 469 | ^\\\\marginpar\\>\\|^\\\\parbox\\>\\|^\\\\caption\\>") | ||
| 470 | (setq paragraph-separate "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$\\|\ | ||
| 471 | ^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\ | ||
| 472 | ^\\\\chapter\\>\\|^\\\\section\\>\\|\ | ||
| 473 | ^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\ | ||
| 474 | ^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\ | ||
| 475 | ^\\\\item[ \t]*$\\|^\\\\bibitem[ \t]*$\\|^\\\\newline[ \t]*$\\|^\\\\noindent[ \t]*$\\|\ | ||
| 476 | ^\\\\[a-z]*space[ \t]*$\\|^\\\\[a-z]*skip[ \t]*$\\|\ | ||
| 477 | ^\\\\newpage[ \t]*$\\|^\\\\[a-z]*page[a-z]*[ \t]*$\\|^\\\\footnote[ \t]*$\\|\ | ||
| 478 | ^\\\\marginpar[ \t]*$\\|^\\\\parbox[ \t]*$\\|^\\\\caption[ \t]*$") | ||
| 437 | (run-hooks | 479 | (run-hooks |
| 438 | 'text-mode-hook 'tex-mode-hook 'latex-mode-hook 'slitex-mode-hook)) | 480 | 'text-mode-hook 'tex-mode-hook 'latex-mode-hook 'slitex-mode-hook)) |
| 439 | 481 | ||
| @@ -464,9 +506,11 @@ Entering SliTeX mode calls the value of `text-mode-hook', then the value of | |||
| 464 | (set-syntax-table tex-mode-syntax-table)) | 506 | (set-syntax-table tex-mode-syntax-table)) |
| 465 | (make-local-variable 'paragraph-start) | 507 | (make-local-variable 'paragraph-start) |
| 466 | ;; A line containing just $$ is treated as a paragraph separator. | 508 | ;; A line containing just $$ is treated as a paragraph separator. |
| 467 | (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$") | 509 | (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$") |
| 468 | (make-local-variable 'paragraph-separate) | 510 | (make-local-variable 'paragraph-separate) |
| 469 | (setq paragraph-separate paragraph-start) | 511 | ;; A line starting with $$ starts a paragraph, |
| 512 | ;; but does not separate paragraphs if it has more stuff on it. | ||
| 513 | (setq paragraph-separate "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$") | ||
| 470 | (make-local-variable 'comment-start) | 514 | (make-local-variable 'comment-start) |
| 471 | (setq comment-start "%") | 515 | (setq comment-start "%") |
| 472 | (make-local-variable 'comment-start-skip) | 516 | (make-local-variable 'comment-start-skip) |