summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorSimen Heggestøyl <simenheg@gmail.com>2020-05-25 21:29:02 +0200
committerSimen Heggestøyl <simenheg@gmail.com>2020-05-26 17:42:32 +0200
commit449810bbe99d6f6ad6f1e0dfa1edc3c8997e5465 (patch)
tree57201ebf5d75ab2117eeaf2822dba36e87f1c75b /lisp
parent5a48ede3acb1f21a8dd6d56ebbc675b7225d28e5 (diff)
downloademacs-449810bbe99d6f6ad6f1e0dfa1edc3c8997e5465.tar.gz
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/project.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index f00aca83d2d..be0b2e4d5f5 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 ()