]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/db-javascript.el
Update copyright year to 2015
[gnu-emacs] / lisp / cedet / semantic / db-javascript.el
index 42203806fd4ea9e0709d6e3c7c1c87f16c13dae2..24aa6b702cd5c0d4e3113297fae3f6bfb111da20 100644 (file)
@@ -1,7 +1,6 @@
 ;;; semantic/db-javascript.el --- Semantic database extensions for javascript
 
-;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
-;;; Free Software Foundation, Inc.
+;; Copyright (C) 2002-2015 Free Software Foundation, Inc.
 
 ;; Author: Joakim Verona
 
@@ -35,8 +34,8 @@
 (eval-when-compile
   ;; For generic function searching.
   (require 'eieio)
-  (require 'eieio-opt)
-  )
+  (require 'eieio-opt))
+
 ;;; Code:
 (defvar semanticdb-javascript-tags
   '(("eval" function
@@ -77,7 +76,7 @@
       (("uriComponent" variable nil nil nil)))
      nil nil))
   "Hard-coded list of javascript tags for semanticdb.
-See bottom of this file for instruction on managing this list.")
+See bottom of this file for instructions on managing this list.")
 
 ;;; Classes:
 (defclass semanticdb-table-javascript (semanticdb-search-results-table)
@@ -87,7 +86,7 @@ See bottom of this file for instruction on managing this list.")
 
 (defclass semanticdb-project-database-javascript
   (semanticdb-project-database
-   eieio-singleton ;this db is for js globals, so singleton is apropriate
+   eieio-singleton ;this db is for js globals, so singleton is appropriate
    )
   ((new-table-class :initform semanticdb-table-javascript
                    :type class
@@ -107,7 +106,7 @@ See bottom of this file for instruction on managing this list.")
 (defvar-mode-local javascript-mode semanticdb-find-default-throttle
   '(project omniscience)
   "Search project files, then search this omniscience database.
-It is not necessary to to system or recursive searching because of
+It is not necessary to do system or recursive searching because of
 the omniscience database.")
 
 ;;; Filename based methods
@@ -138,27 +137,26 @@ Create one of our special tables that can act as an intermediary."
 
 (defmethod semanticdb-get-tags ((table semanticdb-table-javascript ))
   "Return the list of tags belonging to TABLE."
-  ;; NOTE: Omniscient databases probably don't want to keep large tabes
+  ;; NOTE: Omniscient databases probably don't want to keep large tables
   ;;       lolly-gagging about.  Keep internal Emacs tables empty and
   ;;       refer to alternate databases when you need something.
   semanticdb-javascript-tags)
 
 (defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer)
   "Return non-nil if TABLE's mode is equivalent to BUFFER.
-Equivalent modes are specified by by `semantic-equivalent-major-modes'
+Equivalent modes are specified by the `semantic-equivalent-major-modes'
 local variable."
-  (save-excursion
-    (set-buffer buffer)
+  (with-current-buffer buffer
     (eq (or mode-local-active-mode major-mode) 'javascript-mode)))
 
 ;;; Usage
 ;;
-;; Unlike other tables, an omniscent database does not need to
+;; Unlike other tables, an omniscient database does not need to
 ;; be associated with a path.  Use this routine to always add ourselves
 ;; to a search list.
 (define-mode-local-override semanticdb-find-translate-path javascript-mode
   (path brutish)
-  "Return a list of semanticdb tables asociated with PATH.
+  "Return a list of semanticdb tables associated with PATH.
 If brutish, do the default action.
 If not brutish, do the default action, and append the system
 database (if available.)"
@@ -217,7 +215,7 @@ Return a list of tags."
 
 (defmethod semanticdb-find-tags-for-completion-method
   ((table semanticdb-table-javascript) prefix &optional tags)
-  "In TABLE, find all occurances of tags matching PREFIX.
+  "In TABLE, find all occurrences of tags matching PREFIX.
 Optional argument TAGS is a list of tags to search.
 Returns a table of all matching tags."
   (if tags (call-next-method)
@@ -227,7 +225,7 @@ Returns a table of all matching tags."
 
 (defmethod semanticdb-find-tags-by-class-method
   ((table semanticdb-table-javascript) class &optional tags)
-  "In TABLE, find all occurances of tags of CLASS.
+  "In TABLE, find all occurrences of tags of CLASS.
 Optional argument TAGS is a list of tags to search.
 Returns a table of all matching tags."
   (if tags (call-next-method)
@@ -249,7 +247,7 @@ Returns a table of all matching tags."
 (defmethod semanticdb-deep-find-tags-by-name-method
   ((table semanticdb-table-javascript) name &optional tags)
   "Find all tags name NAME in TABLE.
-Optional argument TAGS is a list of tags t
+Optional argument TAGS is a list of tags to search.
 Like `semanticdb-find-tags-by-name-method' for javascript."
   (semanticdb-find-tags-by-name-method table name tags))
 
@@ -262,7 +260,7 @@ Like `semanticdb-find-tags-by-name-method' for javascript."
 
 (defmethod semanticdb-deep-find-tags-for-completion-method
   ((table semanticdb-table-javascript) prefix &optional tags)
-  "In TABLE, find all occurances of tags matching PREFIX.
+  "In TABLE, find all occurrences of tags matching PREFIX.
 Optional argument TAGS is a list of tags to search.
 Like `semanticdb-find-tags-for-completion-method' for javascript."
   (semanticdb-find-tags-for-completion-method table prefix tags))
@@ -271,7 +269,7 @@ Like `semanticdb-find-tags-for-completion-method' for javascript."
 ;;
 (defmethod semanticdb-find-tags-external-children-of-type-method
   ((table semanticdb-table-javascript) type &optional tags)
-  "Find all nonterminals which are child elements of TYPE
+  "Find all nonterminals which are child elements of TYPE.
 Optional argument TAGS is a list of tags to search.
 Return a list of tags."
   (if tags (call-next-method)