diff options
| author | Dmitry Gutov | 2023-11-25 17:04:32 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2023-11-25 17:04:32 +0200 |
| commit | efae0e68efc79bc5eb7c86a30c127006d3b374e2 (patch) | |
| tree | e11264c8f6bf9013466497d8c49d9789381c48ed | |
| parent | ab37e0b56a9eb204ec73c8d5f65aac3bfe5ea6ff (diff) | |
| download | emacs-efae0e68efc79bc5eb7c86a30c127006d3b374e2.tar.gz emacs-efae0e68efc79bc5eb7c86a30c127006d3b374e2.zip | |
(project-prompt-project-name): Simplify a bit
* lisp/progmodes/project.el (project-prompt-project-name):
Fold the inner 'let' into 'when-let'.
| -rw-r--r-- | lisp/progmodes/project.el | 10 |
1 files 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." | |||
| 1802 | ;; Iterate in reverse order so project--name-history is in | 1802 | ;; Iterate in reverse order so project--name-history is in |
| 1803 | ;; the same order as project--list. | 1803 | ;; the same order as project--list. |
| 1804 | (dolist (dir (reverse (project-known-project-roots))) | 1804 | (dolist (dir (reverse (project-known-project-roots))) |
| 1805 | ;; we filter out directories that no longer map to a project, | 1805 | ;; We filter out directories that no longer map to a project, |
| 1806 | ;; since they don't have a clean project-name. | 1806 | ;; since they don't have a clean project-name. |
| 1807 | (when-let (proj (project--find-in-directory dir)) | 1807 | (when-let ((proj (project--find-in-directory dir)) |
| 1808 | (let ((name (project-name proj))) | 1808 | (name (project-name proj))) |
| 1809 | (push name project--name-history) | 1809 | (push name project--name-history) |
| 1810 | (push (cons name proj) ret)))) | 1810 | (push (cons name proj) ret))) |
| 1811 | ret)) | 1811 | ret)) |
| 1812 | ;; XXX: Just using this for the category (for the substring | 1812 | ;; XXX: Just using this for the category (for the substring |
| 1813 | ;; completion style). | 1813 | ;; completion style). |