alexeyr / company-auctex

company-mode autocompletion for auctex
49 stars 18 forks source link

Support comma separated list of references #34

Open malb opened 4 years ago

malb commented 4 years ago

Autocompletion won't work for \cite{foo,ba_ this can be fixed by doing something like this:

    (prefix (let ((prefixes (company-auctex-prefix "\\\\cite[^[{]*\\(?:\\[[^]]*\\]\\)?{\\([^}]*\\)\\=")))
              (if prefixes
                  (last (split-string prefixes "," t))
                nil)))

https://github.com/malb/emacs.d/commit/4f6267f23c653af706550b2c89e31eb174a76073