From: Stefan Bund Date: Fri, 6 Oct 2017 10:31:21 +0000 (+0200) Subject: project autoload extension X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=HEAD;p=emacsstuff.git project autoload extension --- diff --git a/cc-ide/cc-ide.el b/cc-ide/cc-ide.el index fd84edf..1adbd3f 100644 --- a/cc-ide/cc-ide.el +++ b/cc-ide/cc-ide.el @@ -1706,10 +1706,9 @@ instatiations at point." (ccide-apply-ed-diff replacements)))) nil)) -(defun ccide-project-load-config () - (if (buffer-file-name) - (let ((conf (ccide-project-search-upwards '(".project.el" "project.el") - (file-name-directory (buffer-file-name))))) +(defun ccide-project-load-config (&optional force) + (if (or force (buffer-file-name)) + (let ((conf (ccide-project-search-upwards '(".project.el" "project.el") default-directory))) (when conf (set (make-local-variable 'ccide-project-root) (file-name-directory conf)) (load-file conf)))))