diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-07-08 14:13:35 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-07-08 14:13:35 +0300 |
commit | 85156f549daae18d1559eba0c249b42ba914834b (patch) | |
tree | 360823b67ddb9e9a4c4c77518f9e3b841754c675 /lisp | |
parent | 106e023e7c08fef5e1397df74e99bd369c32bb03 (diff) | |
download | emacs-85156f549daae18d1559eba0c249b42ba914834b.tar.gz |
Rename project{,-find}-functions and update some docstrings
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/project.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 21c51905d2d..b18d65d2758 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -27,9 +27,9 @@ (require 'cl-generic) -(defvar project-functions '(project-try-vc - project-try-ede - project-ask-user) +(defvar project-find-functions (list #'project-try-vc + #'project-try-ede + #'project-ask-user) "Special hook to find the project containing a given directory. Each functions on this hook is called in turn with one argument (the directory) and should return either nil to mean @@ -39,23 +39,24 @@ that it is not applicable, or a project instance.") (defun project-current (&optional dir) "Return the project instance in DIR or `default-directory'." (unless dir (setq dir default-directory)) - (run-hook-with-args-until-success 'project-functions dir)) + (run-hook-with-args-until-success 'project-find-functions dir)) (cl-defgeneric project-root (project) - "Return the root directory of the current project.") + "Return the root directory of the current project. +The directory name should be absolute.") (cl-defgeneric project-source-directories (project) "Return the list of source directories. Including any where source (or header, etc) files used by the current project may be found. Including those outside of the -project tree." +project tree. The directory names should be absolute." (project-directories project)) (cl-defgeneric project-directories (project) "Return the list of directories related to the current project. It should include the current project root, then possibly the roots of any currently open related projects (if they're meant to -be edited together)." +be edited together). The directory names should be absolute." (list (project-root project))) (defvar project-vc-root-files '(".git" ".hg" ".bzr")) |