1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-27 10:21:14 -08:00

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'.
This commit is contained in:
Simen Heggestøyl 2020-05-27 17:17:15 +02:00
parent 449810bbe9
commit b7dffcb501

View file

@ -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 ()