diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2020-06-22 16:58:02 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2020-06-22 16:58:02 +0300 |
commit | bea5eb77b3170203424179274bf26b9ce70de807 (patch) | |
tree | 9fc17654605faa7cb29f3007f8d168608359da58 | |
parent | 2be719827fec097267e4dfcb88877022b9f2e6cd (diff) | |
download | emacs-bea5eb77b3170203424179274bf26b9ce70de807.tar.gz |
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.el | 3 |
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." (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)))))) |