1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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)
This commit is contained in:
Kevin Ryde 2019-10-30 22:32:45 +01:00 committed by Stefan Kangas
parent 772f1c4189
commit 94b8153eaa

View file

@ -1139,6 +1139,7 @@ subshell is initiated, `tex-shell-hook' is run."
;; 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.
;; For \pagebreak allow latex optional arg like \pagebreak[2]
(setq paragraph-start
(concat "[ \t]*\\(\\$\\$\\|"
"\\\\[][]\\|"
@ -1162,7 +1163,7 @@ subshell is initiated, `tex-shell-hook' is run."
"noindent" "newpage" "footnote"
"marginpar" "parbox" "caption"))
"\\|\\$\\$\\|[a-z]*\\(space\\|skip\\|page[a-z]*\\)"
"\\>\\)[ \t]*\\($\\|%\\)\\)"))
"\\>\\)[][0-9 \t]*\\($\\|%\\)\\)"))
(setq-local imenu-create-index-function #'latex-imenu-create-index)
(setq-local tex-face-alist tex-latex-face-alist)
(add-hook 'fill-nobreak-predicate #'latex-fill-nobreak-predicate nil t)