aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cedet/semantic/db-javascript.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/semantic/db-javascript.el')
-rw-r--r--lisp/cedet/semantic/db-javascript.el36
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el
index 24aa6b702cd..4aced34d8ef 100644
--- a/lisp/cedet/semantic/db-javascript.el
+++ b/lisp/cedet/semantic/db-javascript.el
@@ -111,7 +111,7 @@ the omniscience database.")
111 111
112;;; Filename based methods 112;;; Filename based methods
113;; 113;;
114(defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-javascript)) 114(cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-javascript))
115 "For a javascript database, there are no explicit tables. 115 "For a javascript database, there are no explicit tables.
116Create one of our special tables that can act as an intermediary." 116Create one of our special tables that can act as an intermediary."
117 ;; NOTE: This method overrides an accessor for the `tables' slot in 117 ;; NOTE: This method overrides an accessor for the `tables' slot in
@@ -126,23 +126,23 @@ Create one of our special tables that can act as an intermediary."
126 (oset newtable parent-db obj) 126 (oset newtable parent-db obj)
127 (oset newtable tags nil) 127 (oset newtable tags nil)
128 )) 128 ))
129 (call-next-method) 129 (cl-call-next-method)
130 ) 130 )
131 131
132(defmethod semanticdb-file-table ((obj semanticdb-project-database-javascript) filename) 132(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-javascript) filename)
133 "From OBJ, return FILENAME's associated table object." 133 "From OBJ, return FILENAME's associated table object."
134 ;; NOTE: See not for `semanticdb-get-database-tables'. 134 ;; NOTE: See not for `semanticdb-get-database-tables'.
135 (car (semanticdb-get-database-tables obj)) 135 (car (semanticdb-get-database-tables obj))
136 ) 136 )
137 137
138(defmethod semanticdb-get-tags ((table semanticdb-table-javascript )) 138(cl-defmethod semanticdb-get-tags ((table semanticdb-table-javascript ))
139 "Return the list of tags belonging to TABLE." 139 "Return the list of tags belonging to TABLE."
140 ;; NOTE: Omniscient databases probably don't want to keep large tables 140 ;; NOTE: Omniscient databases probably don't want to keep large tables
141 ;; lolly-gagging about. Keep internal Emacs tables empty and 141 ;; lolly-gagging about. Keep internal Emacs tables empty and
142 ;; refer to alternate databases when you need something. 142 ;; refer to alternate databases when you need something.
143 semanticdb-javascript-tags) 143 semanticdb-javascript-tags)
144 144
145(defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer) 145(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer)
146 "Return non-nil if TABLE's mode is equivalent to BUFFER. 146 "Return non-nil if TABLE's mode is equivalent to BUFFER.
147Equivalent modes are specified by the `semantic-equivalent-major-modes' 147Equivalent modes are specified by the `semantic-equivalent-major-modes'
148local variable." 148local variable."
@@ -192,43 +192,43 @@ database (if available.)"
192 (setq tags (cdr tags))) 192 (setq tags (cdr tags)))
193 result)) 193 result))
194 194
195(defmethod semanticdb-find-tags-by-name-method 195(cl-defmethod semanticdb-find-tags-by-name-method
196 ((table semanticdb-table-javascript) name &optional tags) 196 ((table semanticdb-table-javascript) name &optional tags)
197 "Find all tags named NAME in TABLE. 197 "Find all tags named NAME in TABLE.
198Return a list of tags." 198Return a list of tags."
199 (if tags 199 (if tags
200 ;; If TAGS are passed in, then we don't need to do work here. 200 ;; If TAGS are passed in, then we don't need to do work here.
201 (call-next-method) 201 (cl-call-next-method)
202 (assoc-string name semanticdb-javascript-tags) 202 (assoc-string name semanticdb-javascript-tags)
203 )) 203 ))
204 204
205(defmethod semanticdb-find-tags-by-name-regexp-method 205(cl-defmethod semanticdb-find-tags-by-name-regexp-method
206 ((table semanticdb-table-javascript) regex &optional tags) 206 ((table semanticdb-table-javascript) regex &optional tags)
207 "Find all tags with name matching REGEX in TABLE. 207 "Find all tags with name matching REGEX in TABLE.
208Optional argument TAGS is a list of tags to search. 208Optional argument TAGS is a list of tags to search.
209Return a list of tags." 209Return a list of tags."
210 (if tags (call-next-method) 210 (if tags (cl-call-next-method)
211 ;; YOUR IMPLEMENTATION HERE 211 ;; YOUR IMPLEMENTATION HERE
212 (semanticdb-javascript-regexp-search regex) 212 (semanticdb-javascript-regexp-search regex)
213 213
214 )) 214 ))
215 215
216(defmethod semanticdb-find-tags-for-completion-method 216(cl-defmethod semanticdb-find-tags-for-completion-method
217 ((table semanticdb-table-javascript) prefix &optional tags) 217 ((table semanticdb-table-javascript) prefix &optional tags)
218 "In TABLE, find all occurrences of tags matching PREFIX. 218 "In TABLE, find all occurrences of tags matching PREFIX.
219Optional argument TAGS is a list of tags to search. 219Optional argument TAGS is a list of tags to search.
220Returns a table of all matching tags." 220Returns a table of all matching tags."
221 (if tags (call-next-method) 221 (if tags (cl-call-next-method)
222 ;; YOUR IMPLEMENTATION HERE 222 ;; YOUR IMPLEMENTATION HERE
223 (semanticdb-javascript-regexp-search (concat "^" prefix ".*")) 223 (semanticdb-javascript-regexp-search (concat "^" prefix ".*"))
224 )) 224 ))
225 225
226(defmethod semanticdb-find-tags-by-class-method 226(cl-defmethod semanticdb-find-tags-by-class-method
227 ((table semanticdb-table-javascript) class &optional tags) 227 ((table semanticdb-table-javascript) class &optional tags)
228 "In TABLE, find all occurrences of tags of CLASS. 228 "In TABLE, find all occurrences of tags of CLASS.
229Optional argument TAGS is a list of tags to search. 229Optional argument TAGS is a list of tags to search.
230Returns a table of all matching tags." 230Returns a table of all matching tags."
231 (if tags (call-next-method) 231 (if tags (cl-call-next-method)
232 ;; YOUR IMPLEMENTATION HERE 232 ;; YOUR IMPLEMENTATION HERE
233 ;; 233 ;;
234 ;; Note: This search method could be considered optional in an 234 ;; Note: This search method could be considered optional in an
@@ -244,21 +244,21 @@ Returns a table of all matching tags."
244;; alone, otherwise replace with implementations similar to those 244;; alone, otherwise replace with implementations similar to those
245;; above. 245;; above.
246;; 246;;
247(defmethod semanticdb-deep-find-tags-by-name-method 247(cl-defmethod semanticdb-deep-find-tags-by-name-method
248 ((table semanticdb-table-javascript) name &optional tags) 248 ((table semanticdb-table-javascript) name &optional tags)
249 "Find all tags name NAME in TABLE. 249 "Find all tags name NAME in TABLE.
250Optional argument TAGS is a list of tags to search. 250Optional argument TAGS is a list of tags to search.
251Like `semanticdb-find-tags-by-name-method' for javascript." 251Like `semanticdb-find-tags-by-name-method' for javascript."
252 (semanticdb-find-tags-by-name-method table name tags)) 252 (semanticdb-find-tags-by-name-method table name tags))
253 253
254(defmethod semanticdb-deep-find-tags-by-name-regexp-method 254(cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method
255 ((table semanticdb-table-javascript) regex &optional tags) 255 ((table semanticdb-table-javascript) regex &optional tags)
256 "Find all tags with name matching REGEX in TABLE. 256 "Find all tags with name matching REGEX in TABLE.
257Optional argument TAGS is a list of tags to search. 257Optional argument TAGS is a list of tags to search.
258Like `semanticdb-find-tags-by-name-method' for javascript." 258Like `semanticdb-find-tags-by-name-method' for javascript."
259 (semanticdb-find-tags-by-name-regexp-method table regex tags)) 259 (semanticdb-find-tags-by-name-regexp-method table regex tags))
260 260
261(defmethod semanticdb-deep-find-tags-for-completion-method 261(cl-defmethod semanticdb-deep-find-tags-for-completion-method
262 ((table semanticdb-table-javascript) prefix &optional tags) 262 ((table semanticdb-table-javascript) prefix &optional tags)
263 "In TABLE, find all occurrences of tags matching PREFIX. 263 "In TABLE, find all occurrences of tags matching PREFIX.
264Optional argument TAGS is a list of tags to search. 264Optional argument TAGS is a list of tags to search.
@@ -267,12 +267,12 @@ Like `semanticdb-find-tags-for-completion-method' for javascript."
267 267
268;;; Advanced Searches 268;;; Advanced Searches
269;; 269;;
270(defmethod semanticdb-find-tags-external-children-of-type-method 270(cl-defmethod semanticdb-find-tags-external-children-of-type-method
271 ((table semanticdb-table-javascript) type &optional tags) 271 ((table semanticdb-table-javascript) type &optional tags)
272 "Find all nonterminals which are child elements of TYPE. 272 "Find all nonterminals which are child elements of TYPE.
273Optional argument TAGS is a list of tags to search. 273Optional argument TAGS is a list of tags to search.
274Return a list of tags." 274Return a list of tags."
275 (if tags (call-next-method) 275 (if tags (cl-call-next-method)
276 ;; YOUR IMPLEMENTATION HERE 276 ;; YOUR IMPLEMENTATION HERE
277 ;; 277 ;;
278 ;; OPTIONAL: This could be considered an optional function. It is 278 ;; OPTIONAL: This could be considered an optional function. It is