]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/srecode/semantic.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / cedet / srecode / semantic.el
index ae96b86a9bcf26d0dd193b86a1d111d07831c7f7..0ea2ab4a5ff6979727589a471821d94854491016 100644 (file)
@@ -1,6 +1,6 @@
 ;;; srecode/semantic.el --- Semantic specific extensions to SRecode.
 
-;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 
@@ -55,7 +55,7 @@
   "Wrap up a collection of semantic tag information.
 This class will be used to derive dictionary values.")
 
-(defmethod srecode-compound-toString((cp srecode-semantic-tag)
+(cl-defmethod srecode-compound-toString((cp srecode-semantic-tag)
                                     function
                                     dictionary)
   "Convert the compound dictionary value CP to a string.
@@ -91,7 +91,7 @@ The hook is called with two arguments, the TAG and DICT
 to be augmented.")
 
 (define-overload srecode-semantic-apply-tag-to-dict (tagobj dict)
-  "Insert fewatures of TAGOBJ into the dictionary DICT.
+  "Insert features of TAGOBJ into the dictionary DICT.
 TAGOBJ is an object of class `srecode-semantic-tag'.  This class
 is a compound inserter value.
 DICT is a dictionary object.
@@ -195,7 +195,7 @@ variable default values, and other things."
 ;;; :tag ARGUMENT HANDLING
 ;;
 ;; When a :tag argument is required, identify the current :tag,
-;; and apply it's parts into the dictionary.
+;; and apply its parts into the dictionary.
 (defun srecode-semantic-handle-:tag (dict)
   "Add macros into the dictionary DICT based on the current :tag."
   ;; We have a tag, start adding "stuff" into the dictionary.
@@ -305,8 +305,8 @@ or `code'.
 
 For various conditions, this function looks for a template with
 the name CLASS-tag, where CLASS is the tag class.  If it cannot
-find that, it will look for that template in the
-`declaration'context (if the current context was not `declaration').
+find that, it will look for that template in the `declaration'
+context (if the current context was not `declaration').
 
 If PROTOTYPE is specified, it will first look for templates with
 the name CLASS-tag-prototype, or CLASS-prototype as above.
@@ -351,6 +351,12 @@ as `function' will leave point where code might be inserted."
           (setq temp (srecode-semantic-find-template
                       "variable-const" prototype ctxt))
           )
+
+         ((and (semantic-tag-of-class-p tag 'include)
+               (semantic-tag-get-attribute tag :system-flag))
+          (setq temp (srecode-semantic-find-template
+                      "system-include" prototype ctxt))
+          )
          )
 
     (when (not temp)
@@ -382,7 +388,7 @@ as `function' will leave point where code might be inserted."
       (error "Cannot find template %s in %s for inserting tag %S"
             errtype top (semantic-format-tag-summarize tag)))
 
-    ;; Resolve Arguments
+    ;; Resolve arguments
     (let ((srecode-semantic-selected-tag tag))
       (srecode-resolve-arguments temp dict))
 
@@ -394,7 +400,7 @@ as `function' will leave point where code might be inserted."
        (srecode-semantic-apply-tag-to-dict tagobj dict)))
 
     ;; Insert dict-entries into the dictionary LAST so that previous
-    ;; items can be overriden.
+    ;; items can be overridden.
     (let ((entries dict-entries))
       (while entries
        (srecode-dictionary-set-value dict
@@ -428,5 +434,4 @@ as `function' will leave point where code might be inserted."
 
 (provide 'srecode/semantic)
 
-;; arch-tag: b87ccbd6-bd87-48bc-8182-1043a9052d79
 ;;; srecode/semantic.el ends here