emacs-diffs
[Top][All Lists]
Advanced

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

feature/project-switching 449810b 15/15: Avoid adding the empty string t


From: Simen Heggest°yl
Subject: feature/project-switching 449810b 15/15: Avoid adding the empty string to the project list
Date: Tue, 26 May 2020 11:43:19 -0400 (EDT)

branch: feature/project-switching
commit 449810bbe99d6f6ad6f1e0dfa1edc3c8997e5465
Author: Simen Heggest├Şyl <address@hidden>
Commit: Simen Heggest├Şyl <address@hidden>

    Avoid adding the empty string to the project list
    
    * lisp/progmodes/project.el (project--read-project-list): Avoid adding
    the empty string to the project list.
---
 lisp/progmodes/project.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index f00aca8..be0b2e4 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -735,9 +735,10 @@ loop using the command \\[fileloop-continue]."
       (let ((dirs (split-string (string-trim (buffer-string)) "\n"))
             (project-list '()))
         (dolist (dir dirs)
-          (cl-pushnew (file-name-as-directory dir)
-                      project-list
-                      :test #'equal))
+          (unless (string-empty-p dir)
+            (cl-pushnew (file-name-as-directory dir)
+                        project-list
+                        :test #'equal)))
         (setq project--list (reverse project-list))))))
 
 (defun project--ensure-read-project-list ()



reply via email to

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