(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
(defun company-eclim-executable-find ()
(let (file)
- (dolist (eclipse-root '("/Applications/eclipse" "/usr/lib/eclipse"
+ (cl-dolist (eclipse-root '("/Applications/eclipse" "/usr/lib/eclipse"
"/usr/local/lib/eclipse"))
(and (file-exists-p (setq file (expand-file-name "plugins" eclipse-root)))
(setq file (car (last (directory-files file t "^org.eclim_"))))
(defun company-files-grab-existing-name ()
;; Grab file names with spaces, only when they include quotes.
(let (file dir)
- (and (dolist (regexp company-files-regexps)
+ (and (cl-dolist (regexp company-files-regexps)
(when (setq file (company-grab-line regexp 1))
(cl-return file)))
(setq dir (file-name-directory file))
(defun company-safe-backends-p (backends)
(and (consp backends)
- (not (dolist (backend backends)
+ (not (cl-dolist (backend backends)
(unless (if (consp backend)
(company-safe-backends-p backend)
(assq backend company-safe-backends))
;; No initialization for lambdas.
((functionp backend) t)
(t ;; Must be a list.
- (dolist (b backend)
+ (cl-dolist (b backend)
(unless (keywordp b)
(company-init-backend b))))))
(`duplicates t)
((or `prefix `ignore-case `no-cache `require-match)
(let (value)
- (dolist (backend backends)
+ (cl-dolist (backend backends)
(when (setq value (company--force-sync
backend (cons command args) backend))
(cl-return value)))))
(let ((len (length prefix))
(completion-ignore-case ignore-case)
prev)
- (dotimes (i (1+ len))
+ (cl-dotimes (i (1+ len))
(when (setq prev (cdr (assoc (substring prefix 0 (- len i))
company-candidates-cache)))
(setq candidates (all-completions prefix prev))
(append before (reverse after))
(append after (reverse before)))))
(company-cancel)
- (dolist (backend next)
+ (cl-dolist (backend next)
(when (ignore-errors (company-begin-backend backend))
(cl-return t))))
(company-manual-begin))
(defun company--begin-new ()
(let (prefix c)
- (dolist (backend (if company-backend
- ;; prefer manual override
- (list company-backend)
- company-backends))
+ (cl-dolist (backend (if company-backend
+ ;; prefer manual override
+ (list company-backend)
+ company-backends))
(setq prefix
(if (or (symbolp backend)
(functionp backend))
(defun company-search (text lines)
(let ((quoted (regexp-quote text))
(i 0))
- (dolist (line lines)
+ (cl-dolist (line lines)
(when (string-match quoted line (length company-prefix))
(cl-return i))
(cl-incf i))))