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:
parent
449810bbe9
commit
b7dffcb501
1 changed files with 4 additions and 5 deletions
|
|
@ -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 ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue