]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/analyze.el
Spelling fixes.
[gnu-emacs] / lisp / cedet / semantic / analyze.el
index 02c959f8646238b304b2837781b214b8c957c253..ef09ea13b422f23095f25d6f1e3ca11d78a7e713 100644 (file)
@@ -1,7 +1,6 @@
 ;;; semantic/analyze.el --- Analyze semantic tags against local context
 
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 2000-2005, 2007-2011  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 
@@ -58,7 +57,7 @@
 ;;
 ;; context - A semantic datatype representing a point in a buffer.
 ;;
-;; constriant - If a context specifies a specific datatype is needed,
+;; constraint - If a context specifies a specific datatype is needed,
 ;;       that is a constraint.
 ;; constants - Some datatypes define elements of themselves as a
 ;;       constant.  These need to be returned as there would be no
@@ -101,13 +100,13 @@ Usually bound to the dimension of a single symbol or command.")
           :type list
           :documentation "List of tags defining local text.
 This can be nil, or a list where the last element can be a string
-representing text that may be incomplete.  Preceeding elements
+representing text that may be incomplete.  Preceding elements
 must be semantic tags representing variables or functions
 called in a dereference sequence.")
    (prefixclass :initarg :prefixclass
                :type list
                :documentation "Tag classes expected at this context.
-These are clases for tags, such as 'function, or 'variable.")
+These are classes for tags, such as 'function, or 'variable.")
    (prefixtypes :initarg :prefixtypes
           :type list
           :documentation "List of tags defining types for :prefix.
@@ -162,7 +161,7 @@ be just a string in some circumstances.")
 (defclass semantic-analyze-context-return (semantic-analyze-context)
   () ; No extra data.
   "Analysis class for return data.
-Return data methods identify the requred type by the return value
+Return data methods identify the required type by the return value
 of the parent function.")
 
 ;;; METHODS
@@ -253,9 +252,9 @@ Optional argument THROWSYM specifies a symbol the throw on non-recoverable error
        (tag nil)                       ; tag return list
        (tagtype nil)                   ; tag types return list
        (fname nil)
-       (miniscope (clone scope))
+       (miniscope (when scope (clone scope)))
        )
-    ;; First order check.  Is this wholely contained in the typecache?
+    ;; First order check.  Is this wholly contained in the typecache?
     (setq tmp (semanticdb-typecache-find sequence))
 
     (if tmp
@@ -288,7 +287,7 @@ Optional argument THROWSYM specifies a symbol the throw on non-recoverable error
 
     ;; For the middle entries
     (while s
-      ;; Using the tag found in TMP, lets find the tag
+      ;; Using the tag found in TMP, let's find the tag
       ;; representing the full typeographic information of its
       ;; type, and use that to determine the search context for
       ;; (car s)
@@ -297,12 +296,13 @@ Optional argument THROWSYM specifies a symbol the throw on non-recoverable error
              ;; and we can use it directly.
              (cond ((semantic-tag-of-class-p tmp 'type)
                     ;; update the miniscope when we need to analyze types directly.
-                    (let ((rawscope
-                           (apply 'append
-                                  (mapcar 'semantic-tag-type-members
-                                          tagtype))))
-                      (oset miniscope fullscope rawscope))
-                    ;; Now analayze the type to remove metatypes.
+                    (when miniscope
+                      (let ((rawscope
+                             (apply 'append
+                                    (mapcar 'semantic-tag-type-members
+                                            tagtype))))
+                        (oset miniscope fullscope rawscope)))
+                    ;; Now analyze the type to remove metatypes.
                     (or (semantic-analyze-type tmp miniscope)
                         tmp))
                    (t
@@ -351,7 +351,7 @@ Optional argument SCOPE specifies a scope object which has
 additional tags which are in SCOPE and do not need prefixing to
 find.
 
-This is a wrapper on top of semanticdb, semanticdb-typecache,
+This is a wrapper on top of semanticdb, semanticdb typecache,
 semantic-scope, and semantic search functions.  Almost all
 searches use the same arguments."
   (let ((namelst (if (consp name) name ;; test if pre-split.
@@ -476,7 +476,7 @@ If called interactively, display interesting information about POSITION
 in a separate buffer.
 Returns an object based on symbol `semantic-analyze-context'.
 
-This function can be overriden with the symbol `analyze-context'.
+This function can be overridden with the symbol `analyze-context'.
 When overriding this function, your override will be called while
 cursor is at POSITION.  In addition, your function will not be called
 if a cached copy of the return object is found."
@@ -794,5 +794,4 @@ CONTEXT's content is described in `semantic-analyze-current-context'."
 ;; generated-autoload-load-name: "semantic/analyze"
 ;; End:
 
-;; arch-tag: 1102143a-1c05-4631-83e8-45aafc6b4a59
 ;;; semantic/analyze.el ends here