Add 2011 to FSF/AIST copyright years.
[bpt/emacs.git] / lisp / cedet / semantic / decorate / include.el
index 0be1d0a..af4e446 100644 (file)
@@ -1,6 +1,6 @@
 ;;; semantic/decorate/include.el --- Decoration modes for include statements
 
-;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 
@@ -118,7 +118,7 @@ Used by the decoration style: `semantic-decoration-on-includes'."
   '((((class color) (background dark))
      (:background "#900000"))
     (((class color) (background light))
-     (:background "#ff5050")))
+     (:background "#fff0f0")))
   "*Face used to show includes that cannot be found.
 Used by the decoration style: `semantic-decoration-on-unknown-includes'."
   :group 'semantic-faces)
@@ -302,16 +302,19 @@ This mode provides a nice context menu on the include statements."
        )
       ))
 
-    (let ((ol (semantic-decorate-tag tag
-                                    (semantic-tag-start tag)
-                                    (semantic-tag-end tag)
-                                    face))
-         )
-      (semantic-overlay-put ol 'mouse-face 'highlight)
-      (semantic-overlay-put ol 'keymap map)
-      (semantic-overlay-put ol 'help-echo
-                           "Header File : mouse-3 - Context menu")
-      )))
+    ;; @TODO - if not a tag w/ a position, we need to get one.  How?
+
+    (when (semantic-tag-with-position-p tag)
+      (let ((ol (semantic-decorate-tag tag
+                                      (semantic-tag-start tag)
+                                      (semantic-tag-end tag)
+                                      face))
+           )
+       (semantic-overlay-put ol 'mouse-face 'highlight)
+       (semantic-overlay-put ol 'keymap map)
+       (semantic-overlay-put ol 'help-echo
+                             "Header File : mouse-3 - Context menu")
+       ))))
 
 ;;; Regular Include Functions
 ;;
@@ -326,7 +329,7 @@ Argument EVENT is the mouse clicked event."
                  (semanticdb-file-table-object file t))))
     (with-output-to-temp-buffer (help-buffer) ; "*Help*"
       (help-setup-xref (list #'semantic-decoration-include-describe)
-                      (interactive-p))
+                      (called-interactively-p 'interactive))
       (princ "Include File: ")
       (princ (semantic-format-tag-name tag nil t))
       (princ "\n")
@@ -425,7 +428,7 @@ Argument EVENT is the mouse clicked event."
        (mm major-mode))
     (with-output-to-temp-buffer (help-buffer) ; "*Help*"
       (help-setup-xref (list #'semantic-decoration-unknown-include-describe)
-                      (interactive-p))
+                      (called-interactively-p 'interactive))
       (princ "Include File: ")
       (princ (semantic-format-tag-name tag nil t))
       (princ "\n\n")
@@ -461,7 +464,7 @@ wrap existing project code for Semantic's benifit.
 
       (when (or (eq mm 'c++-mode) (eq mm 'c-mode))
        (princ "
-For C/C++ includes located within a project, you can use a special
+For C/C++ includes located within a project, you can use a special
 EDE project that will wrap an existing build system.  You can do that
 like this in your .emacs file:
 
@@ -507,7 +510,7 @@ Argument EVENT is the mouse clicked event."
   (let ((tag (semantic-current-tag)))
     (with-output-to-temp-buffer (help-buffer); "*Help*"
       (help-setup-xref (list #'semantic-decoration-unparsed-include-describe)
-                      (interactive-p))
+                      (called-interactively-p 'interactive))
 
       (princ "Include File: ")
       (princ (semantic-format-tag-name tag nil t))
@@ -588,7 +591,7 @@ Argument EVENT describes the event that caused this function to be called."
         )
     (with-output-to-temp-buffer (help-buffer) ;"*Help*"
       (help-setup-xref (list #'semantic-decoration-all-include-summary)
-                      (interactive-p))
+                      (called-interactively-p 'interactive))
 
       (princ "Include Summary for File: ")
       (princ (file-truename (buffer-file-name)))