Mercurial > emacs
comparison lisp/cedet/semantic/analyze.el @ 110534:826d60163924
Merge changes from emacs-23 branch.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 23 Sep 2010 22:10:54 -0400 |
parents | a5ad4f188e19 |
children | 376148b31b5e |
comparison
equal
deleted
inserted
replaced
110517:64945cefe6a6 | 110534:826d60163924 |
---|---|
251 (let ((s sequence) ; copy of the sequence | 251 (let ((s sequence) ; copy of the sequence |
252 (tmp nil) ; tmp find variable | 252 (tmp nil) ; tmp find variable |
253 (tag nil) ; tag return list | 253 (tag nil) ; tag return list |
254 (tagtype nil) ; tag types return list | 254 (tagtype nil) ; tag types return list |
255 (fname nil) | 255 (fname nil) |
256 (miniscope (clone scope)) | 256 (miniscope (when scope (clone scope))) |
257 ) | 257 ) |
258 ;; First order check. Is this wholely contained in the typecache? | 258 ;; First order check. Is this wholely contained in the typecache? |
259 (setq tmp (semanticdb-typecache-find sequence)) | 259 (setq tmp (semanticdb-typecache-find sequence)) |
260 | 260 |
261 (if tmp | 261 (if tmp |
295 (let* ((tmptype | 295 (let* ((tmptype |
296 ;; In some cases the found TMP is a type, | 296 ;; In some cases the found TMP is a type, |
297 ;; and we can use it directly. | 297 ;; and we can use it directly. |
298 (cond ((semantic-tag-of-class-p tmp 'type) | 298 (cond ((semantic-tag-of-class-p tmp 'type) |
299 ;; update the miniscope when we need to analyze types directly. | 299 ;; update the miniscope when we need to analyze types directly. |
300 (let ((rawscope | 300 (when miniscope |
301 (apply 'append | 301 (let ((rawscope |
302 (mapcar 'semantic-tag-type-members | 302 (apply 'append |
303 tagtype)))) | 303 (mapcar 'semantic-tag-type-members |
304 (oset miniscope fullscope rawscope)) | 304 tagtype)))) |
305 (oset miniscope fullscope rawscope))) | |
305 ;; Now analayze the type to remove metatypes. | 306 ;; Now analayze the type to remove metatypes. |
306 (or (semantic-analyze-type tmp miniscope) | 307 (or (semantic-analyze-type tmp miniscope) |
307 tmp)) | 308 tmp)) |
308 (t | 309 (t |
309 (semantic-analyze-tag-type tmp scope)))) | 310 (semantic-analyze-tag-type tmp scope)))) |
349 such as 'function or 'variable. | 350 such as 'function or 'variable. |
350 Optional argument SCOPE specifies a scope object which has | 351 Optional argument SCOPE specifies a scope object which has |
351 additional tags which are in SCOPE and do not need prefixing to | 352 additional tags which are in SCOPE and do not need prefixing to |
352 find. | 353 find. |
353 | 354 |
354 This is a wrapper on top of semanticdb, semanticdb-typecache, | 355 This is a wrapper on top of semanticdb, semanticdb typecache, |
355 semantic-scope, and semantic search functions. Almost all | 356 semantic-scope, and semantic search functions. Almost all |
356 searches use the same arguments." | 357 searches use the same arguments." |
357 (let ((namelst (if (consp name) name ;; test if pre-split. | 358 (let ((namelst (if (consp name) name ;; test if pre-split. |
358 (semantic-analyze-split-name name)))) | 359 (semantic-analyze-split-name name)))) |
359 (cond | 360 (cond |