(dirs (list root))
(project-files-relative-names t))
(project-find-file-in
- (or (thing-at-point 'filename)
- (and buffer-file-name (project--find-default-from buffer-file-name pr)))
+ (delq nil (list (and buffer-file-name (project--find-default-from
+ buffer-file-name pr))
+ (thing-at-point 'filename)))
dirs pr include-all)))
;;;###autoload
(project-external-roots pr)))
(project-file-history-behavior t))
(project-find-file-in
- (or (thing-at-point 'filename)
- (and buffer-file-name (project--find-default-from buffer-file-name pr)))
+ (delq nil (list (and buffer-file-name (project--find-default-from
+ buffer-file-name pr))
+ (thing-at-point 'filename)))
dirs pr include-all)))
(defcustom project-read-file-name-function #'project--read-file-cpd-relative
(setq all-files
(delete common-parent-directory all-files))
t))
- (mb-default (if (and common-parent-directory
- mb-default
- (file-name-absolute-p mb-default))
- (file-relative-name mb-default common-parent-directory)
- mb-default))
+ (mb-default (mapcar (lambda (mb-default)
+ (if (and common-parent-directory
+ mb-default
+ (file-name-absolute-p mb-default))
+ (file-relative-name
+ mb-default common-parent-directory)
+ mb-default))
+ (if (listp mb-default) mb-default (list mb-default))))
(substrings (mapcar (lambda (s) (substring s cpd-length)) all-files))
(_ (when included-cpd
(setq substrings (cons "./" substrings))))