aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimen Heggestøyl2020-05-27 17:17:15 +0200
committerSimen Heggestøyl2020-05-27 17:26:25 +0200
commitb7dffcb501d30297e2fa8184b587da18f458ca66 (patch)
tree94283429d83b85c63d0208861313ae7d4388c589
parent449810bbe99d6f6ad6f1e0dfa1edc3c8997e5465 (diff)
downloademacs-b7dffcb501d30297e2fa8184b587da18f458ca66.tar.gz
emacs-b7dffcb501d30297e2fa8184b587da18f458ca66.zip
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'.
-rw-r--r--lisp/progmodes/project.el9
1 files changed, 4 insertions, 5 deletions
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]."
732 (project--ensure-file-exists filename) 732 (project--ensure-file-exists filename)
733 (with-temp-buffer 733 (with-temp-buffer
734 (insert-file-contents filename) 734 (insert-file-contents filename)
735 (let ((dirs (split-string (string-trim (buffer-string)) "\n")) 735 (let ((dirs (split-string (buffer-string) "\n" t))
736 (project-list '())) 736 (project-list '()))
737 (dolist (dir dirs) 737 (dolist (dir dirs)
738 (unless (string-empty-p dir) 738 (cl-pushnew (file-name-as-directory dir)
739 (cl-pushnew (file-name-as-directory dir) 739 project-list
740 project-list 740 :test #'equal))
741 :test #'equal)))
742 (setq project--list (reverse project-list)))))) 741 (setq project--list (reverse project-list))))))
743 742
744(defun project--ensure-read-project-list () 743(defun project--ensure-read-project-list ()