;;; company-dabbrev.el --- dabbrev-like company-mode completion back-end -*- lexical-binding: t -*-
-;; Copyright (C) 2009, 2011, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2014, 2015 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
(defun company-dabbrev--search-buffer (regexp pos symbols start limit
ignore-comments)
(save-excursion
- (cl-flet ((maybe-collect-match
- ()
- (let ((match (match-string-no-properties 0)))
- (when (and (>= (length match) company-dabbrev-minimum-length)
- (not (and company-dabbrev-ignore-invisible
- (invisible-p (match-beginning 0)))))
- (push match symbols)))))
+ (cl-labels ((maybe-collect-match
+ ()
+ (let ((match (match-string-no-properties 0)))
+ (when (and (>= (length match) company-dabbrev-minimum-length)
+ (not (and company-dabbrev-ignore-invisible
+ (invisible-p (match-beginning 0)))))
+ (push match symbols)))))
(goto-char (if pos (1- pos) (point-min)))
;; search before pos
(company-dabrev--time-limit-while (re-search-backward regexp nil t)