summaryrefslogtreecommitdiff
path: root/lisp/cedet/ede/cpp-root.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/ede/cpp-root.el')
-rw-r--r--lisp/cedet/ede/cpp-root.el40
1 files changed, 23 insertions, 17 deletions
diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el
index e6fd92759de..48b83f30bb0 100644
--- a/lisp/cedet/ede/cpp-root.el
+++ b/lisp/cedet/ede/cpp-root.el
@@ -85,7 +85,7 @@
;; file name for a header in your project where most of your CPP
;; macros reside. Doing this can be easier than listing everything in
;; the :spp-table option. The files listed in :spp-files should not
-;; start with a /, and are relative to something in :include-path.;;
+;; start with a /, and are relative to something in :include-path.
;;
;; If you want to override the file-finding tool with your own
;; function you can do this:
@@ -135,7 +135,8 @@
;; :proj-file 'MY-FILE-FOR-DIR
;; :proj-root 'MY-ROOT-FCN
;; :load-type 'MY-LOAD
-;; :class-sym 'ede-cpp-root)
+;; :class-sym 'ede-cpp-root-project
+;; :safe-p t)
;; t)
;;
;;; TODO
@@ -238,16 +239,20 @@ ROOTPROJ is nil, since there is only one project."
(ede-cpp-root-file-existing dir))
;;;###autoload
-(add-to-list 'ede-project-class-files
- (ede-project-autoload "cpp-root"
- :name "CPP ROOT"
- :file 'ede/cpp-root
- :proj-file 'ede-cpp-root-project-file-for-dir
- :proj-root 'ede-cpp-root-project-root
- :load-type 'ede-cpp-root-load
- :class-sym 'ede-cpp-root
- :new-p nil)
- t)
+(ede-add-project-autoload
+ (ede-project-autoload "cpp-root"
+ :name "CPP ROOT"
+ :file 'ede-cpp-root
+ :proj-file 'ede-cpp-root-project-file-for-dir
+ :proj-root 'ede-cpp-root-project-root
+ :load-type 'ede-cpp-root-load
+ :class-sym 'ede-cpp-root
+ :new-p nil
+ :safe-p t)
+ ;; When a user creates one of these, it should override any other project
+ ;; type that might happen to be in this directory, so force this to the
+ ;; very front.
+ 'unique)
;;; CLASSES
;;
@@ -439,6 +444,7 @@ This knows details about or source tree."
;; Else, do the usual.
(setq ans (call-next-method)))
)))
+ ;; TODO - does this call-next-method happen twice. Is that bad?? Why is it here?
(or ans (call-next-method))))
(defmethod ede-project-root ((this ede-cpp-root-project))
@@ -500,16 +506,16 @@ Also set up the lexical preprocessor map."
(table (when expfile
(semanticdb-file-table-object expfile)))
)
- (when (not table)
- (message "Cannot find file %s in project." F))
- (when (and table (semanticdb-needs-refresh-p table))
- (semanticdb-refresh-table table)
+ (if (not table)
+ (message "Cannot find file %s in project." F)
+ (when (semanticdb-needs-refresh-p table)
+ (semanticdb-refresh-table table))
(setq spp (append spp (oref table lexical-table))))))
(oref this spp-files))
spp))
(defmethod ede-system-include-path ((this ede-cpp-root-target))
- "Get the system include path used by project THIS."
+ "Get the system include path used by target THIS."
(ede-system-include-path (ede-target-parent this)))
(defmethod ede-preprocessor-map ((this ede-cpp-root-target))