diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-12-05 19:10:42 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-12-05 19:10:42 +0000 |
commit | 1dc5c6f318d8b4a92e8552b74fdf097386c5d771 (patch) | |
tree | a60555c90b2947bbcbb8045841bed9632eb0a188 /lisp/cedet | |
parent | bfadeadd326a68c086ed122d1e8f16ba1e079144 (diff) | |
download | emacs-1dc5c6f318d8b4a92e8552b74fdf097386c5d771.tar.gz |
* cedet/semantic/bovine/c.el (semantic-c-describe-environment):
Describe project macro symbols.
* cedet/semantic/complete.el (semantic-complete-do-completion):
Don't call semantic-collector-current-exact-match.
* cedet/ede.el (ede-apply-preprocessor-map): Accept lists of
ede-objects as targets.
* cedet/ede/pmake.el (ede-proj-makefile-insert-variables): Output
a target's object list even if compiler vars are already in the
Makefile.
* cedet/ede/emacs.el (ede-preprocessor-map): Add config.h to the
list of headers producing necessary macros.
Diffstat (limited to 'lisp/cedet')
-rw-r--r-- | lisp/cedet/ede.el | 11 | ||||
-rw-r--r-- | lisp/cedet/ede/emacs.el | 7 | ||||
-rw-r--r-- | lisp/cedet/ede/pmake.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/bovine/c.el | 18 | ||||
-rw-r--r-- | lisp/cedet/semantic/complete.el | 9 |
5 files changed, 41 insertions, 6 deletions
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 0db1d803580..35066c57928 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -1865,12 +1865,17 @@ Return the first non-nil value returned by PROC." (defun ede-apply-preprocessor-map () "Apply preprocessor tables onto the current buffer." (when (and ede-object (boundp 'semantic-lex-spp-macro-symbol-obarray)) - (let ((map (ede-preprocessor-map ede-object))) + (let* ((objs ede-object) + (map (ede-preprocessor-map (if (consp objs) + (car objs) + objs)))) (when map ;; We can't do a require for the below symbol. (setq semantic-lex-spp-macro-symbol-obarray - (semantic-lex-make-spp-table map)) - )))) + (semantic-lex-make-spp-table map))) + (when (consp objs) + (message "Choosing preprocessor syms for project %s" + (object-name (car objs))))))) (defmethod ede-system-include-path ((this ede-project)) "Get the system include path used by project THIS." diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index f6eb57ba596..902621eec37 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el @@ -219,6 +219,8 @@ All files need the macros from lisp.h!" (root (ede-project-root proj)) (table (semanticdb-file-table-object (ede-expand-filename root "lisp.h"))) + (config (semanticdb-file-table-object + (ede-expand-filename root "config.h"))) filemap ) (when table @@ -226,6 +228,11 @@ All files need the macros from lisp.h!" (semanticdb-refresh-table table)) (setq filemap (append filemap (oref table lexical-table))) ) + (when config + (when (semanticdb-needs-refresh-p config) + (semanticdb-refresh-table config)) + (setq filemap (append filemap (oref config lexical-table))) + ) filemap )) diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index 6ded4be2834..4a5f1ed20a6 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -427,9 +427,9 @@ sources variable." (src (oref this source))) (while comp (ede-compiler-only-once (car comp) - (ede-proj-makefile-insert-object-variables (car comp) name src) (ede-proj-makefile-insert-variables (car comp))) (setq comp (cdr comp))) + (ede-proj-makefile-insert-object-variables (car comp) name src) (while link (ede-linker-only-once (car link) (ede-proj-makefile-insert-variables (car link))) diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index b775bbf76a3..d4b8bafbf78 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -1759,6 +1759,24 @@ DO NOT return the list of tags encompassing point." (princ "\n") )) + (when (arrayp semantic-lex-spp-project-macro-symbol-obarray) + (princ "\n Project symbol map:\n") + (princ " Your project symbol map is derived from the EDE object:\n ") + (princ (object-print ede-object)) + (princ "\n\n") + (let ((macros nil)) + (mapatoms + #'(lambda (symbol) + (setq macros (cons symbol macros))) + semantic-lex-spp-project-macro-symbol-obarray) + (dolist (S macros) + (princ " ") + (princ (symbol-name S)) + (princ " = ") + (princ (symbol-value S)) + (princ "\n") + ))) + (princ "\n\n Use: M-x semantic-lex-spp-describe RET\n") (princ "\n to see the complete macro table.\n") diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index c379b05534c..73875c5b6aa 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -515,8 +515,13 @@ if INLINE, then completion is happening inline in a buffer." (semantic-displayor-set-completions displayor (or - (and (not (eq na 'displayend)) - (semantic-collector-current-exact-match collector)) + ;; For the below - This caused problems for Chong Yidong + ;; when experimenting with the completion engine. I don't + ;; remember what the problem was though, and I wasn't sure why + ;; the below two lines were there since they obviously added + ;; some odd behavior. -EML + ;; (and (not (eq na 'displayend)) + ;; (semantic-collector-current-exact-match collector)) (semantic-collector-all-completions collector contents)) contents) ;; Ask the displayor to display them. |