mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
(project-prompt-project-name): Simplify a bit
* lisp/progmodes/project.el (project-prompt-project-name): Fold the inner 'let' into 'when-let'.
This commit is contained in:
parent
ab37e0b56a
commit
efae0e68ef
1 changed files with 5 additions and 5 deletions
|
|
@ -1802,12 +1802,12 @@ It's also possible to enter an arbitrary directory not in the list."
|
|||
;; Iterate in reverse order so project--name-history is in
|
||||
;; the same order as project--list.
|
||||
(dolist (dir (reverse (project-known-project-roots)))
|
||||
;; we filter out directories that no longer map to a project,
|
||||
;; We filter out directories that no longer map to a project,
|
||||
;; since they don't have a clean project-name.
|
||||
(when-let (proj (project--find-in-directory dir))
|
||||
(let ((name (project-name proj)))
|
||||
(push name project--name-history)
|
||||
(push (cons name proj) ret))))
|
||||
(when-let ((proj (project--find-in-directory dir))
|
||||
(name (project-name proj)))
|
||||
(push name project--name-history)
|
||||
(push (cons name proj) ret)))
|
||||
ret))
|
||||
;; XXX: Just using this for the category (for the substring
|
||||
;; completion style).
|
||||
|
|
|
|||
Loading…
Reference in a new issue