diff --git a/modules/on-demand/me-latex.el b/modules/on-demand/me-latex.el index 569d3bc6..577498e9 100644 --- a/modules/on-demand/me-latex.el +++ b/modules/on-demand/me-latex.el @@ -55,100 +55,16 @@ :config ;; Adapted from Doom Emacs and Crafted Emacs ;; Set a correct indentation in a few additional environments - (add-to-list 'LaTeX-indent-environment-list '("lstlisting" current-indentation)) - (add-to-list 'LaTeX-indent-environment-list '("tikzcd" LaTeX-indent-tabular)) - (add-to-list 'LaTeX-indent-environment-list '("tikzpicture" current-indentation)) + (cl-callf append LaTeX-indent-environment-list + '(("tikzcd" LaTeX-indent-tabular) + ("lstlisting" current-indentation) + ("tikzpicture" current-indentation))) ;; Add a few macros and environment as verbatim - (add-to-list 'LaTeX-verbatim-environments "lstlisting") - (add-to-list 'LaTeX-verbatim-environments "Verbatim") + (cl-callf append LaTeX-verbatim-environments '("lstlisting" "Verbatim")) + (cl-callf append LaTeX-verbatim-environments '("lstlisting" "Verbatim")) (add-to-list 'LaTeX-verbatim-macros-with-braces "lstinline") - (add-to-list 'LaTeX-verbatim-macros-with-delims "lstinline") - - ;; Fontification taken from: https://tex.stackexchange.com/a/86119/81279 - (setq font-latex-match-reference-keywords - '(;; BibLaTeX. - ("printbibliography" "[{") - ("addbibresource" "[{") - ;; Standard commands. - ("cite" "[{") - ("citep" "[{") - ("citet" "[{") - ("Cite" "[{") - ("parencite" "[{") - ("Parencite" "[{") - ("footcite" "[{") - ("footcitetext" "[{") - ;; Style-specific commands. - ("textcite" "[{") - ("Textcite" "[{") - ("smartcite" "[{") - ("Smartcite" "[{") - ("cite*" "[{") - ("parencite*" "[{") - ("supercite" "[{") - ;; Qualified citation lists. - ("cites" "[{") - ("Cites" "[{") - ("parencites" "[{") - ("Parencites" "[{") - ("footcites" "[{") - ("footcitetexts" "[{") - ("smartcites" "[{") - ("Smartcites" "[{") - ("textcites" "[{") - ("Textcites" "[{") - ("supercites" "[{") - ;; Style-independent commands. - ("autocite" "[{") - ("Autocite" "[{") - ("autocite*" "[{") - ("Autocite*" "[{") - ("autocites" "[{") - ("Autocites" "[{") - ;; Text commands. - ("citeauthor" "[{") - ("Citeauthor" "[{") - ("citetitle" "[{") - ("citetitle*" "[{") - ("citeyear" "[{") - ("citedate" "[{") - ("citeurl" "[{") - ;; Special commands. - ("fullcite" "[{") - ;; Cleveref. - ("cref" "{") - ("Cref" "{") - ("cpageref" "{") - ("Cpageref" "{") - ("cpagerefrange" "{") - ("Cpagerefrange" "{") - ("crefrange" "{") - ("Crefrange" "{") - ("labelcref" "{")) - font-latex-match-textual-keywords - '(;; BibLaTeX brackets. - ("parentext" "{") - ("brackettext" "{") - ("hybridblockquote" "[{") - ;; Auxiliary commands. - ("textelp" "{") - ("textelp*" "{") - ("textins" "{") - ("textins*" "{") - ;; Subcaption. - ("subcaption" "[{")) - font-latex-match-variable-keywords - '(;; Amsmath. - ("numberwithin" "{") - ;; Enumitem. - ("setlist" "[{") - ("setlist*" "[{") - ("newlist" "{") - ("renewlist" "{") - ("setlistdepth" "{") - ("restartlist" "{") - ("crefname" "{")))) + (add-to-list 'LaTeX-verbatim-macros-with-delims "lstinline")) ;; Add LatexMk support to AUCTeX