summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-01-03 11:36:14 +0000
committerRichard M. Stallman <rms@gnu.org>1994-01-03 11:36:14 +0000
commitab2c9f5425adf175b55bbedfee929b389605b779 (patch)
treed75e06ab13b8c81e1c8a9e5f542cbf987cdcaa50 /lisp
parent7d5d472e5c465c0bee3717a2158dbbed30ff97eb (diff)
downloademacs-ab2c9f5425adf175b55bbedfee929b389605b779.tar.gz
(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 $$.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/tex-mode.el48
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."
(setq tex-start-of-header "\\documentstyle")
(setq tex-end-of-header "\\begin{document}")
(setq tex-trailer "\\end{document}\n")
+ ;; A line containing just $$ is treated as a paragraph separator.
+ ;; A line starting with $$ starts a paragraph,
+ ;; but does not separate paragraphs if it has more stuff on it.
+ (setq paragraph-start "^[ \t]*$\\|^[\f%]\\|^[ \t]*\\$\\$\\|\
+^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\
+^\\\\chapter\\>\\|^\\\\section\\>\\|\
+^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\
+^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\
+^\\\\item\\>\\|^\\\\bibitem\\>\\|^\\\\newline\\>\\|^\\\\noindent\\>\\|\
+^\\\\[a-z]*space\\>\\|^\\\\[a-z]*skip\\>\\|\
+^\\\\newpage\\>\\|^\\\\[a-z]*page\\|^\\\\footnote\\>\\|\
+^\\\\marginpar\\>\\|^\\\\parbox\\>\\|^\\\\caption\\>")
+ (setq paragraph-separate "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$\\|\
+^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\
+^\\\\chapter\\>\\|^\\\\section\\>\\|\
+^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\
+^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\
+^\\\\item[ \t]*$\\|^\\\\bibitem[ \t]*$\\|^\\\\newline[ \t]*$\\|^\\\\noindent[ \t]*$\\|\
+^\\\\[a-z]*space[ \t]*$\\|^\\\\[a-z]*skip[ \t]*$\\|\
+^\\\\newpage[ \t]*$\\|^\\\\[a-z]*page[a-z]*[ \t]*$\\|^\\\\footnote[ \t]*$\\|\
+^\\\\marginpar[ \t]*$\\|^\\\\parbox[ \t]*$\\|^\\\\caption[ \t]*$")
(run-hooks 'text-mode-hook 'tex-mode-hook 'latex-mode-hook))
;;;###autoload
@@ -434,6 +455,27 @@ Entering SliTeX mode calls the value of `text-mode-hook', then the value of
(setq tex-start-of-header "\\documentstyle{slides}")
(setq tex-end-of-header "\\begin{document}")
(setq tex-trailer "\\end{document}\n")
+ ;; A line containing just $$ is treated as a paragraph separator.
+ ;; A line starting with $$ starts a paragraph,
+ ;; but does not separate paragraphs if it has more stuff on it.
+ (setq paragraph-start "^[ \t]*$\\|^[\f%]\\|^[ \t]*\\$\\$\\|\
+^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\
+^\\\\chapter\\>\\|^\\\\section\\>\\|\
+^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\
+^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\
+^\\\\item\\>\\|^\\\\bibitem\\>\\|^\\\\newline\\>\\|^\\\\noindent\\>\\|\
+^\\\\[a-z]*space\\>\\|^\\\\[a-z]*skip\\>\\|\
+^\\\\newpage\\>\\|^\\\\[a-z]*page\\|^\\\\footnote\\>\\|\
+^\\\\marginpar\\>\\|^\\\\parbox\\>\\|^\\\\caption\\>")
+ (setq paragraph-separate "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$\\|\
+^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|\
+^\\\\chapter\\>\\|^\\\\section\\>\\|\
+^\\\\subsection\\>\\|^\\\\subsubsection\\>\\|\
+^\\\\paragraph\\>\\|^\\\\subparagraph\\>\\|\
+^\\\\item[ \t]*$\\|^\\\\bibitem[ \t]*$\\|^\\\\newline[ \t]*$\\|^\\\\noindent[ \t]*$\\|\
+^\\\\[a-z]*space[ \t]*$\\|^\\\\[a-z]*skip[ \t]*$\\|\
+^\\\\newpage[ \t]*$\\|^\\\\[a-z]*page[a-z]*[ \t]*$\\|^\\\\footnote[ \t]*$\\|\
+^\\\\marginpar[ \t]*$\\|^\\\\parbox[ \t]*$\\|^\\\\caption[ \t]*$")
(run-hooks
'text-mode-hook 'tex-mode-hook 'latex-mode-hook 'slitex-mode-hook))
@@ -464,9 +506,11 @@ Entering SliTeX mode calls the value of `text-mode-hook', then the value of
(set-syntax-table tex-mode-syntax-table))
(make-local-variable 'paragraph-start)
;; A line containing just $$ is treated as a paragraph separator.
- (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$")
+ (setq paragraph-start "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$")
(make-local-variable 'paragraph-separate)
- (setq paragraph-separate paragraph-start)
+ ;; A line starting with $$ starts a paragraph,
+ ;; but does not separate paragraphs if it has more stuff on it.
+ (setq paragraph-separate "^[ \t]*$\\|^[\f\\\\%]\\|^[ \t]*\\$\\$[ \t]*$")
(make-local-variable 'comment-start)
(setq comment-start "%")
(make-local-variable 'comment-start-skip)