From: Simen Heggestøyl Date: Thu, 4 Jun 2020 17:29:10 +0000 (+0200) Subject: ; Small cleanup in project.el X-Git-Tag: emacs-28.0.90~7213 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b41be0ee83bdcc7882b360b66105f192503f0dc7;p=emacs.git ; Small cleanup in project.el * lisp/progmodes/project.el (project--add-to-project-list-front): Minor simplification after recent changes. --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index c701b801599..c5b6209d9b4 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -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))))