Add +fold flag to lang/latex for TeX-fold
This commit is contained in:
parent
b3af9dbc3c
commit
5e35662b9f
4 changed files with 54 additions and 3 deletions
|
@ -39,6 +39,18 @@ Continuation lines are indented either twice `LaTeX-indent-level', or
|
|||
(+ offset indent))
|
||||
((+ contin indent))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +latex-fold-last-macro-a (&rest _)
|
||||
"Advice to auto-fold LaTeX macros after functions that
|
||||
typically insert macros."
|
||||
;; A simpler approach would be to just fold the whole line, but if point was
|
||||
;; inside a macro that would would kick it out. So instead we fold the last
|
||||
;; macro before point, hoping its the one newly inserted.
|
||||
(TeX-fold-region (save-excursion
|
||||
(search-backward "\\" (line-beginning-position) t)
|
||||
(point))
|
||||
(1+ (point))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +latex-symbols-company-backend (command &optional arg &rest _ignored)
|
||||
"A wrapper backend for `company-mode' that either uses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue