Fix +lookup/file in non-project files

file-in-directory-p threw wrong-type-argument stringp errors because
project-root was nil.
This commit is contained in:
Henrik Lissner 2019-06-08 15:46:47 +02:00
parent 766fc3e4a9
commit 5683ffe0d2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -302,7 +302,7 @@ Otherwise, falls back on `find-file-at-point'."
(ffap-file-finder (ffap-file-finder
(cond ((not (file-directory-p fullpath)) (cond ((not (file-directory-p fullpath))
#'find-file) #'find-file)
((file-in-directory-p fullpath project-root) ((ignore-errors (file-in-directory-p fullpath project-root))
(lambda (dir) (lambda (dir)
(let ((default-directory dir)) (let ((default-directory dir))
(without-project-cache! (without-project-cache!