refactor(latex): reformat code for readability

This commit is contained in:
Tim Ruffing
2025-07-18 09:40:47 +02:00
committed by Henrik Lissner
parent 8d60c982f3
commit ac530efe87

View File

@@ -87,14 +87,16 @@ okular and pdf-tools.")
;; We have to use lower case modes here, because `smartparens-mode' uses ;; We have to use lower case modes here, because `smartparens-mode' uses
;; the same during configuration. ;; the same during configuration.
(let ((modes '(tex-mode plain-tex-mode latex-mode LaTeX-mode))) (let ((modes '(tex-mode plain-tex-mode latex-mode LaTeX-mode)))
;; All these excess pairs dramatically slow down typing in LaTeX buffers, (dolist (open '(
;; so we remove them. Let snippets do their job. ;; All these pairs dramatically slow down typing in LaTeX
(dolist (open '("\\left(" "\\left[" "\\left\\{" "\\left|" ;; buffers, so remove them. Let snippets do their job.
"\\bigl(" "\\biggl(" "\\Bigl(" "\\Biggl(" "\\bigl[" "\\left(" "\\left[" "\\left\\{" "\\left|"
"\\biggl[" "\\Bigl[" "\\Biggl[" "\\bigl\\{" "\\biggl\\{" "\\bigl(" "\\biggl(" "\\Bigl(" "\\Biggl("
"\\Bigl\\{" "\\Biggl\\{" "\\bigl[" "\\biggl[" "\\Bigl[" "\\Biggl["
"\\bigl\\{" "\\biggl\\{" "\\Bigl\\{" "\\Biggl\\{"
"\\lfloor" "\\lceil" "\\langle" "\\lfloor" "\\lceil" "\\langle"
"\\lVert" "\\lvert" "`")) "\\lVert" "\\lvert"
"`"))
(sp-local-pair modes open nil :actions :rem)) (sp-local-pair modes open nil :actions :rem))
;; And tweak these so that users can decide whether they want use LaTeX ;; And tweak these so that users can decide whether they want use LaTeX
;; quotes or not, via `+latex-enable-plain-double-quotes'. ;; quotes or not, via `+latex-enable-plain-double-quotes'.