]> code.delx.au - gnu-emacs-elpa/blobdiff - company-dabbrev-code.el
Fix the test breakage (probably)
[gnu-emacs-elpa] / company-dabbrev-code.el
index 408d2b25b150bb772432fa4a681c1f6762f11ba5..1039e4a66d192e511bc5e989f3067b564d4a0c6f 100644 (file)
@@ -27,7 +27,7 @@
 
 (require 'company)
 (require 'company-dabbrev)
-(eval-when-compile (require 'cl))
+(require 'cl-lib)
 
 (defgroup company-dabbrev-code nil
   "dabbrev-like completion back-end for code."
@@ -55,7 +55,7 @@ See also `company-dabbrev-code-time-limit'."
                  (const :tag "Same major mode" t)
                  (const :tag "All" all)))
 
-(defcustom company-dabbrev-code-time-limit .5
+(defcustom company-dabbrev-code-time-limit .1
   "Determines how long `company-dabbrev-code' should look for matches."
   :type '(choice (const :tag "Off" nil)
                  (number :tag "Seconds")))
@@ -80,14 +80,14 @@ See also `company-dabbrev-code-time-limit'."
 The back-end looks for all symbols in the current buffer that aren't in
 comments or strings."
   (interactive (list 'interactive))
-  (case command
+  (cl-case command
     (interactive (company-begin-backend 'company-dabbrev-code))
     (prefix (and (or (eq t company-dabbrev-code-modes)
                      (apply 'derived-mode-p company-dabbrev-code-modes))
                  (or company-dabbrev-code-everywhere
                      (not (company-in-string-or-comment)))
                  (or (company-grab-symbol) 'stop)))
-    (candidates (let ((case-fold-search nil))
+    (candidates (let ((case-fold-search company-dabbrev-code-ignore-case))
                   (company-dabbrev--search
                    (company-dabbrev-code--make-regexp arg)
                    company-dabbrev-code-time-limit