From: Simen Heggestøyl Date: Wed, 27 May 2020 15:17:15 +0000 (+0200) Subject: Simplify the previous commit X-Git-Tag: emacs-28.0.90~7260^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b7dffcb501d30297e2fa8184b587da18f458ca66;p=emacs.git Simplify the previous commit * lisp/progmodes/project.el (project--read-project-list): Simplify the previous commit by utilizing the optional OMIT-NULLS argument to 'split-string'. --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index be0b2e4d5f5..a3e81d4d3aa 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -732,13 +732,12 @@ loop using the command \\[fileloop-continue]." (project--ensure-file-exists filename) (with-temp-buffer (insert-file-contents filename) - (let ((dirs (split-string (string-trim (buffer-string)) "\n")) + (let ((dirs (split-string (buffer-string) "\n" t)) (project-list '())) (dolist (dir dirs) - (unless (string-empty-p dir) - (cl-pushnew (file-name-as-directory dir) - project-list - :test #'equal))) + (cl-pushnew (file-name-as-directory dir) + project-list + :test #'equal)) (setq project--list (reverse project-list)))))) (defun project--ensure-read-project-list ()