From: Simen Heggestøyl Date: Mon, 25 May 2020 19:29:02 +0000 (+0200) Subject: Avoid adding the empty string to the project list X-Git-Tag: emacs-28.0.90~7260^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=449810bbe99d6f6ad6f1e0dfa1edc3c8997e5465;p=emacs.git 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. --- 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 ()