Add +latex-symbols-compand-backend delegate #754

If +latex-enable-unicode-math is non-nil, company-math-symbols-unicode
will be used instead of company-math-symbols-latex.
This commit is contained in:
Henrik Lissner 2018-07-29 21:57:56 +02:00
parent 9f4b6869b6
commit c96c2aa7fb
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 22 additions and 12 deletions

View file

@ -40,4 +40,11 @@
(t
(+ contin indent))))))
;;;###autoload
(defun +latex-symbols-company-backend (command &optional arg &rest _ignored)
"A wrapper backend for `company-mode' that either uses
`company-math-symbols-unicode' or `company-math-symbols-latex'. If
`+latex-enable-unicode-math' is non-nil use the former, otherwise the latter."
(if +latex-enable-unicode-math
(company-math-symbols-unicode command arg)
(company-math-symbols-latex command arg)))