branch: master commit 1af61210f16e35889d2bc8bac3c0d207075ef5ca Author: Juergen Hoetzel <juer...@archlinux.org> Commit: Juergen Hoetzel <juer...@archlinux.org>
company-auto-complete-p: Don't use string as regex Fixes invalid-regexp error when first character of input is a regex special char like "[". --- company.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/company.el b/company.el index 637210c..38bf7b8 100644 --- a/company.el +++ b/company.el @@ -1457,7 +1457,8 @@ prefix match (same case) will be prioritized." (if (consp company-auto-complete-chars) (memq (char-syntax (string-to-char input)) company-auto-complete-chars) - (string-match (substring input 0 1) company-auto-complete-chars))))) + (string-match (regexp-quote (substring input 0 1)) + company-auto-complete-chars))))) (defun company--incremental-p () (and (> (point) company-point)