changeset 106431:4ffa662ec661

* 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.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 05 Dec 2009 19:10:42 +0000
parents 0bac804850bd
children a67d65733a07
files lisp/ChangeLog lisp/cedet/ede.el lisp/cedet/ede/emacs.el lisp/cedet/ede/pmake.el lisp/cedet/semantic/bovine/c.el lisp/cedet/semantic/complete.el
diffstat 6 files changed, 59 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Dec 05 13:32:18 2009 +0000
+++ b/lisp/ChangeLog	Sat Dec 05 19:10:42 2009 +0000
@@ -1,3 +1,21 @@
+2009-12-05  Eric Ludlam  <zappo@gnu.org>
+
+	* 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.
+
 2009-12-05  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
 	* textmodes/bibtex.el (bibtex-map-entries): Use marker to keep
--- a/lisp/cedet/ede.el	Sat Dec 05 13:32:18 2009 +0000
+++ b/lisp/cedet/ede.el	Sat Dec 05 19:10:42 2009 +0000
@@ -1865,12 +1865,17 @@
 (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."
--- a/lisp/cedet/ede/emacs.el	Sat Dec 05 13:32:18 2009 +0000
+++ b/lisp/cedet/ede/emacs.el	Sat Dec 05 19:10:42 2009 +0000
@@ -219,6 +219,8 @@
 	 (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 @@
 	(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
     ))
 
--- a/lisp/cedet/ede/pmake.el	Sat Dec 05 13:32:18 2009 +0000
+++ b/lisp/cedet/ede/pmake.el	Sat Dec 05 19:10:42 2009 +0000
@@ -427,9 +427,9 @@
 	(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)))
--- a/lisp/cedet/semantic/bovine/c.el	Sat Dec 05 13:32:18 2009 +0000
+++ b/lisp/cedet/semantic/bovine/c.el	Sat Dec 05 19:10:42 2009 +0000
@@ -1759,6 +1759,24 @@
 	  (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")
 
--- a/lisp/cedet/semantic/complete.el	Sat Dec 05 13:32:18 2009 +0000
+++ b/lisp/cedet/semantic/complete.el	Sat Dec 05 19:10:42 2009 +0000
@@ -515,8 +515,13 @@
 	(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.