emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master efae0e68efc: (project-prompt-project-name): Simplify a bit


From: Dmitry Gutov
Subject: master efae0e68efc: (project-prompt-project-name): Simplify a bit
Date: Sat, 25 Nov 2023 10:04:41 -0500 (EST)

branch: master
commit efae0e68efc79bc5eb7c86a30c127006d3b374e2
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    (project-prompt-project-name): Simplify a bit
    
    * lisp/progmodes/project.el (project-prompt-project-name):
    Fold the inner 'let' into 'when-let'.
---
 lisp/progmodes/project.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 27cca2e0f35..f7f057396e1 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]