]> git.eshelyaron.com Git - emacs.git/commitdiff
project-switch-to-buffer: Improve Ido compatibility
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 22 Jun 2020 13:58:02 +0000 (16:58 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 22 Jun 2020 13:58:02 +0000 (16:58 +0300)
* lisp/progmodes/project.el (project-switch-to-buffer):
Check that the entry contains a non-nil CDR.

lisp/progmodes/project.el

index 60abf54b2bb0128caed57f19fda3c7955d7d767b..2f213dab8b1b2dffc28f083d616c24bd74e04cad 100644 (file)
@@ -810,7 +810,8 @@ is inside the directory hierarchy of the project's root."
          (predicate
           (lambda (buffer)
             ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist.
-            (and (not (eq (cdr buffer) current-buffer))
+            (and (cdr buffer)
+                 (not (eq (cdr buffer) current-buffer))
                  (when-let ((file (buffer-local-value 'default-directory
                                                       (cdr buffer))))
                    (file-in-directory-p file root))))))