]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/company/company-dabbrev.el
Merge commit '51c140ca9ee32d27cacc7b2b07d4539bf98ae575' from company-master
[gnu-emacs-elpa] / packages / company / company-dabbrev.el
index c0cd0e0ab6818ee0150a4a4b9d75492a38fb34cf..401fcc9181f5391ebcdae07f20b37aedfdc78b0d 100644 (file)
@@ -26,7 +26,7 @@
 ;;; Code:
 
 (require 'company)
-(eval-when-compile (require 'cl))
+(require 'cl-lib)
 
 (defgroup company-dabbrev nil
   "dabbrev-like completion back-end."
@@ -73,7 +73,7 @@ If you set this value to nil, you may also want to set
        (while ,test
          ,@body
          (and ,limit
-              (eq (incf company-time-limit-while-counter) 25)
+              (eq (cl-incf company-time-limit-while-counter) 25)
               (setq company-time-limit-while-counter 0)
               (> (float-time (time-since ,start)) ,limit)
               (throw 'done 'company-time-out))))))
@@ -114,7 +114,7 @@ If you set this value to nil, you may also want to set
          (symbols (company-dabbrev--search-buffer regexp (point) nil start limit
                                                   ignore-comments)))
     (when other-buffers
-      (dolist (buffer (delq (current-buffer) (buffer-list)))
+      (cl-dolist (buffer (delq (current-buffer) (buffer-list)))
         (and (or (eq other-buffers 'all)
                  (eq (buffer-local-value 'major-mode buffer) major-mode))
              (with-current-buffer buffer
@@ -123,14 +123,14 @@ If you set this value to nil, you may also want to set
                                                      limit ignore-comments))))
         (and limit
              (> (float-time (time-since start)) limit)
-             (return))))
+             (cl-return))))
     symbols))
 
 ;;;###autoload
 (defun company-dabbrev (command &optional arg &rest ignored)
   "dabbrev-like `company-mode' completion back-end."
   (interactive (list 'interactive))
-  (case command
+  (cl-case command
     (interactive (company-begin-backend 'company-dabbrev))
     (prefix (company-grab-word))
     (candidates