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

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

[elpa] 22/30: company-dabbrev--search: Ignore "uninteresting" buffers


From: Dmitry Gutov
Subject: [elpa] 22/30: company-dabbrev--search: Ignore "uninteresting" buffers
Date: Tue, 14 Oct 2014 22:22:53 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit b6b2ba50f36831e9eb63d96b0655235ce7141388
Author: Dmitry Gutov <address@hidden>
Date:   Wed Oct 8 07:29:16 2014 +0400

    company-dabbrev--search: Ignore "uninteresting" buffers
    
    Closes #199
---
 NEWS.md            |    1 +
 company-dabbrev.el |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 9744ded..6766eb2 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* `company-dabbrev` always ignores "uninteresting" buffers.
 * `company-files` checks directory's last modification time.
 * `company-files` supports relative paths and Windows drive letters.
 
diff --git a/company-dabbrev.el b/company-dabbrev.el
index 84da305..fa28611 100644
--- a/company-dabbrev.el
+++ b/company-dabbrev.el
@@ -121,8 +121,9 @@ This variable affects both `company-dabbrev' and 
`company-dabbrev-code'."
     (when other-buffer-modes
       (cl-dolist (buffer (delq (current-buffer) (buffer-list)))
         (with-current-buffer buffer
-          (when (or (eq other-buffer-modes 'all)
-                    (apply #'derived-mode-p other-buffer-modes))
+          (when (if (eq other-buffer-modes 'all)
+                    (not (string-match-p "\\`[ *]" (buffer-name)))
+                  (apply #'derived-mode-p other-buffer-modes))
             (setq symbols
                   (company-dabbrev--search-buffer regexp nil symbols start
                                                   limit ignore-comments))))



reply via email to

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