aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Ryde2019-10-30 22:32:45 +0100
committerStefan Kangas2019-10-30 22:35:19 +0100
commit94b8153eaa78e376e6ed8c2b04602edf3dadc007 (patch)
tree90c0c22732931abb63d50d0d8fcc78b3a3c15089
parent772f1c4189361c136a921201f40d2350ee3dcae4 (diff)
downloademacs-94b8153eaa78e376e6ed8c2b04602edf3dadc007.tar.gz
emacs-94b8153eaa78e376e6ed8c2b04602edf3dadc007.zip
Support \pagebreak[0] for paragraph-separate in latex-mode
* textmodes/tex-mode.el (latex-mode): In 'paragraph-separate' allow optional argument ('[0]', etc.) for '\pagebreak[0]'. (Bug#19039)
-rw-r--r--lisp/textmodes/tex-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 3d7cc62e265..9b92a2fc60e 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1139,6 +1139,7 @@ subshell is initiated, `tex-shell-hook' is run."
1139 ;; A line containing just $$ is treated as a paragraph separator. 1139 ;; A line containing just $$ is treated as a paragraph separator.
1140 ;; A line starting with $$ starts a paragraph, 1140 ;; A line starting with $$ starts a paragraph,
1141 ;; but does not separate paragraphs if it has more stuff on it. 1141 ;; but does not separate paragraphs if it has more stuff on it.
1142 ;; For \pagebreak allow latex optional arg like \pagebreak[2]
1142 (setq paragraph-start 1143 (setq paragraph-start
1143 (concat "[ \t]*\\(\\$\\$\\|" 1144 (concat "[ \t]*\\(\\$\\$\\|"
1144 "\\\\[][]\\|" 1145 "\\\\[][]\\|"
@@ -1162,7 +1163,7 @@ subshell is initiated, `tex-shell-hook' is run."
1162 "noindent" "newpage" "footnote" 1163 "noindent" "newpage" "footnote"
1163 "marginpar" "parbox" "caption")) 1164 "marginpar" "parbox" "caption"))
1164 "\\|\\$\\$\\|[a-z]*\\(space\\|skip\\|page[a-z]*\\)" 1165 "\\|\\$\\$\\|[a-z]*\\(space\\|skip\\|page[a-z]*\\)"
1165 "\\>\\)[ \t]*\\($\\|%\\)\\)")) 1166 "\\>\\)[][0-9 \t]*\\($\\|%\\)\\)"))
1166 (setq-local imenu-create-index-function #'latex-imenu-create-index) 1167 (setq-local imenu-create-index-function #'latex-imenu-create-index)
1167 (setq-local tex-face-alist tex-latex-face-alist) 1168 (setq-local tex-face-alist tex-latex-face-alist)
1168 (add-hook 'fill-nobreak-predicate #'latex-fill-nobreak-predicate nil t) 1169 (add-hook 'fill-nobreak-predicate #'latex-fill-nobreak-predicate nil t)