Merge from emacs-23
[bpt/emacs.git] / lisp / cedet / ede.el
index 0ca941a..46fcdb0 100644 (file)
@@ -1,7 +1,7 @@
 ;;; ede.el --- Emacs Development Environment gloss
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2007, 2008, 2009  Free Software Foundation, Inc.
+;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: project, make
@@ -43,7 +43,7 @@
 (require 'eieio)
 (require 'eieio-speedbar)
 (require 'ede/source)
-(require 'ede/loaddefs)
+(load "ede/loaddefs" nil 'nomessage)
 
 (declare-function ede-convert-path "ede/files")
 (declare-function ede-directory-get-open-project "ede/files")
   (interactive) (message "EDE %s" ede-version))
 
 (defgroup ede nil
-  "Emacs Development Environment gloss."
+  "Emacs Development Environment."
   :group 'tools
-  :group 'convenience
-  )
+  :group 'extensions)
 
 (defcustom ede-auto-add-method 'ask
   "Whether a new source file should be automatically added to a target.
@@ -1155,7 +1154,7 @@ Optional argument FORCE forces the file to be removed without asking."
   (ede-invoke-method 'project-debug-target))
 
 (defun ede-run-target ()
-  "Debug the current buffer's assocated target."
+  "Run the current buffer's associated target."
   (interactive)
   (ede-invoke-method 'project-run-target))
 
@@ -1381,7 +1380,7 @@ Argument FNND is an argument."
   (error "New-target-custom not supported by %s" (object-name proj)))
 
 (defmethod project-delete-target ((ot ede-target))
-  "Delete the current target OT from it's parent project."
+  "Delete the current target OT from its parent project."
   (error "add-file not supported by %s" (object-name ot)))
 
 (defmethod project-compile-project ((obj ede-project) &optional command)
@@ -1407,7 +1406,7 @@ Argument COMMAND is the command to use for compiling the target."
   (error "Make-dist not supported by %s" (object-name this)))
 
 (defmethod project-dist-files ((this ede-project))
-  "Return a list of files that constitutes a distribution of THIS project."
+  "Return a list of files that constitute a distribution of THIS project."
   (error "Dist-files is not supported by %s" (object-name this)))
 
 (defmethod project-rescan ((this ede-project))
@@ -1421,7 +1420,7 @@ Argument COMMAND is the command to use for compiling the target."
 ;; b) cosmetic.
 
 (defmethod ede-name ((this ede-target))
-  "Return the name of THIS targt."
+  "Return the name of THIS target."
   (oref this name))
 
 (defmethod ede-target-name ((this ede-target))
@@ -1510,7 +1509,7 @@ Also do a quick check to see if there is a Documentation tag in this BUFFER."
        (ede-buffer-documentation-files cp (current-buffer))))))
 
 (defmethod ede-documentation ((this ede-project))
-  "Return a list of files that provides documentation.
+  "Return a list of files that provide documentation.
 Documentation is not for object THIS, but is provided by THIS for other
 files in the project."
   (let ((targ (oref this targets))
@@ -1525,7 +1524,7 @@ files in the project."
     found))
 
 (defmethod ede-documentation ((this ede-target))
-  "Return a list of files that provides documentation.
+  "Return a list of files that provide documentation.
 Documentation is not for object THIS, but is provided by THIS for other
 files in the project."
   nil)
@@ -1651,7 +1650,7 @@ Optional ROOTRETURN will return the root project for DIR."
 
 (defun ede-parent-project (&optional obj)
   "Return the project belonging to the parent directory.
-nil if there is no previous directory.
+Returns nil if there is no previous directory.
 Optional argument OBJ is an object to find the parent of."
   (let* ((proj (or obj ede-object-project)) ;; Current project.
         (root (if obj (ede-project-root obj)
@@ -1865,12 +1864,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."
@@ -1947,7 +1951,7 @@ is the project to use, instead of `ede-current-project'."
 ;;; Debugging.
 
 (defun ede-adebug-project ()
-  "Run adebug against the current ede project.
+  "Run adebug against the current EDE project.
 Display the results as a debug list."
   (interactive)
   (require 'data-debug)
@@ -1957,7 +1961,7 @@ Display the results as a debug list."
     ))
 
 (defun ede-adebug-project-parent ()
-  "Run adebug against the current ede parent project.
+  "Run adebug against the current EDE parent project.
 Display the results as a debug list."
   (interactive)
   (require 'data-debug)
@@ -1967,7 +1971,7 @@ Display the results as a debug list."
     ))
 
 (defun ede-adebug-project-root ()
-  "Run adebug against the current ede parent project.
+  "Run adebug against the current EDE parent project.
 Display the results as a debug list."
   (interactive)
   (require 'data-debug)
@@ -1978,7 +1982,7 @@ Display the results as a debug list."
 \f
 ;;; Hooks & Autoloads
 ;;
-;;  These let us watch various activities, and respond apropriatly.
+;;  These let us watch various activities, and respond appropriately.
 
 ;; (add-hook 'edebug-setup-hook
 ;;       (lambda ()