]> git.eshelyaron.com Git - emacs.git/commitdiff
; Small cleanup in project.el
authorSimen Heggestøyl <simenheg@gmail.com>
Thu, 4 Jun 2020 17:29:10 +0000 (19:29 +0200)
committerSimen Heggestøyl <simenheg@gmail.com>
Thu, 4 Jun 2020 18:11:58 +0000 (20:11 +0200)
* lisp/progmodes/project.el (project--add-to-project-list-front):
Minor simplification after recent changes.

lisp/progmodes/project.el

index c701b801599c138d01abd7df8ae3b13b4682b9c4..c5b6209d9b45dd3e293b245e2c813da2c231f941 100644 (file)
@@ -787,9 +787,8 @@ Arguments the same as in `compile'."
   "Add project PR to the front of the project list.
 Save the result to disk if the project list was changed."
   (project--ensure-read-project-list)
-  (let* ((dir (project-root pr))
-         (do-write (not (equal (car project--list) dir))))
-    (when do-write
+  (let ((dir (project-root pr)))
+    (unless (equal (car project--list) dir)
       (setq project--list (delete dir project--list))
       (push dir project--list)
       (project--write-project-list))))