aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2020-06-22 16:58:02 +0300
committerDmitry Gutov2020-06-22 16:58:02 +0300
commitbea5eb77b3170203424179274bf26b9ce70de807 (patch)
tree9fc17654605faa7cb29f3007f8d168608359da58
parent2be719827fec097267e4dfcb88877022b9f2e6cd (diff)
downloademacs-bea5eb77b3170203424179274bf26b9ce70de807.tar.gz
emacs-bea5eb77b3170203424179274bf26b9ce70de807.zip
project-switch-to-buffer: Improve Ido compatibility
* lisp/progmodes/project.el (project-switch-to-buffer): Check that the entry contains a non-nil CDR.
-rw-r--r--lisp/progmodes/project.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 60abf54b2bb..2f213dab8b1 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -810,7 +810,8 @@ is inside the directory hierarchy of the project's root."
810 (predicate 810 (predicate
811 (lambda (buffer) 811 (lambda (buffer)
812 ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist. 812 ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist.
813 (and (not (eq (cdr buffer) current-buffer)) 813 (and (cdr buffer)
814 (not (eq (cdr buffer) current-buffer))
814 (when-let ((file (buffer-local-value 'default-directory 815 (when-let ((file (buffer-local-value 'default-directory
815 (cdr buffer)))) 816 (cdr buffer))))
816 (file-in-directory-p file root)))))) 817 (file-in-directory-p file root))))))