Function: ede-load-cache

ede-load-cache is a byte-compiled function defined in base.el.gz.

Signature

(ede-load-cache)

Documentation

Load the cache of EDE projects.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/base.el.gz
(defun ede-load-cache ()
  "Load the cache of EDE projects."
  (save-excursion
    (let ((cachebuffer (get-buffer-create "*ede cache*")))
      (condition-case nil
	  (with-current-buffer cachebuffer
	    (erase-buffer)
	    (when (file-exists-p ede-project-placeholder-cache-file)
	      (insert-file-contents ede-project-placeholder-cache-file))
	    (goto-char (point-min))
	    (let ((c (read (current-buffer)))
		  (new nil)
		  (p ede-projects))
	      ;; Remove loaded projects from the cache.
	      (while p
		(setq c (delete (oref (car p) file) c))
		(setq p (cdr p)))
	      ;; Remove projects that aren't on the filesystem
	      ;; anymore.
	      (while c
		(when (file-exists-p (car c))
		  (setq new (cons (car c) new)))
		(setq c (cdr c)))
	      ;; Save it
	      (setq ede-project-cache-files (nreverse new))))
	(error nil))
      (when cachebuffer (kill-buffer cachebuffer))
      )))