emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master d8b6976 5/8: Merge pull request #610 from juergenhoetzel/f


From: Dmitry Gutov
Subject: [elpa] master d8b6976 5/8: Merge pull request #610 from juergenhoetzel/fix-invalid-use-of-string-match
Date: Mon, 14 Nov 2016 00:36:57 +0000 (UTC)

branch: master
commit d8b69764e1a4a4e3c7ad846ed906589cb263e729
Merge: 99dbae9 1af6121
Author: Dmitry Gutov <address@hidden>
Commit: GitHub <address@hidden>

    Merge pull request #610 from juergenhoetzel/fix-invalid-use-of-string-match
    
    Fix invalid use of string match
---
 company.el |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index d9b3fac..38bf7b8 100644
--- a/company.el
+++ b/company.el
@@ -1448,7 +1448,7 @@ prefix match (same case) will be prioritized."
                (eq company-require-match t))))))
 
 (defun company-auto-complete-p (input)
-  "Return non-nil, if input starts with punctuation or parentheses."
+  "Return non-nil, if INPUT starts with punctuation or parentheses."
   (and (if (functionp company-auto-complete)
            (funcall company-auto-complete)
          company-auto-complete)
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]