Function: project--remember-dir

project--remember-dir is a byte-compiled function defined in project.el.gz.

Signature

(project--remember-dir ROOT &optional NO-WRITE)

Documentation

Add project root ROOT to the front of the project list.

Save the result in project-list-file if the list of projects has changed, and NO-WRITE is nil.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
(defun project--remember-dir (root &optional no-write)
  "Add project root ROOT to the front of the project list.
Save the result in `project-list-file' if the list of projects
has changed, and NO-WRITE is nil."
  (project--ensure-read-project-list)
  (let ((dir (abbreviate-file-name root)))
    (unless (equal (caar project--list) dir)
      (dolist (ent project--list)
        (when (equal dir (car ent))
          (setq project--list (delq ent project--list))))
      (push (list dir) project--list)
      (unless no-write
        (project--write-project-list)))))