From: Dmitry Gutov Date: Mon, 22 Jun 2020 13:58:02 +0000 (+0300) Subject: project-switch-to-buffer: Improve Ido compatibility X-Git-Tag: emacs-28.0.90~7111 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bea5eb77b3170203424179274bf26b9ce70de807;p=emacs.git project-switch-to-buffer: Improve Ido compatibility * lisp/progmodes/project.el (project-switch-to-buffer): Check that the entry contains a non-nil CDR. --- 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))))))