comparison lisp/cedet/semantic/bovine/c.el @ 104489:25e047f7f6a2

Synch to Eric Ludlam's upstream CEDET repository. * cedet/semantic/wisent/java-tags.el: * cedet/semantic/wisent/javat-wy.el: New files. * cedet/semantic/wisent/java.el: * cedet/semantic/wisent/java-wy.el: Files removed. * cedet/semantic/java.el (semantic-java-prototype-function) (semantic-java-prototype-variable, semantic-java-prototype-type): Doc fix (java-mode::semantic-format-tag-prototype): Renamed from semantic-format-prototype-tag, which didn't match the overloadable function. * cedet/semantic/bovine/c.el (semantic-c-dereference-namespace-alias): Deal correctly with nested namespaces. Make sure type actually exists in original namespace. * cedet/semantic/lex-spp.el (semantic-lex-spp-hack-depth): New. (semantic-lex-spp-lex-text-string): Use above to enable recursion. * cedet/semantic/format.el: Whitespace cleanup. (semantic-test-all-format-tag-functions): Move to end. (semantic-format-tag-prototype, semantic-format-tag-name) (semantic-format-tag-name-default): Revert to original upstream positions. * cedet/semantic/elp.el: File removed. * cedet/semantic/analyze.el (semantic-adebug-analyze): New function, moved here from semantic/adebug. * cedet/semantic/adebug.el: Declare external semanticdb functions. (semantic-adebug-analyze, semantic-adebug-edebug-expr): Deleted. * emacs-lisp/eieio.el (eieio-unbound): Default value is now robust to recompile. * emacs-lisp/eieio-datadebug.el: Add eieio objects to the list of data debug things to recognize. * emacs-lisp/eieio-comp.el: Synch to upstream. * cedet/data-debug.el: Don't require eieio and semantic/tag. If eieio is loaded, require eieio-datadebug. (data-debug-insert-ring-button): Do not be specific about the ring contents. (data-debug-thing-alist): Remove eieio and semantic specific entries. (data-debug-add-specialized-thing): New function. * cedet/cedet.el: Update commentary. * cedet/cedet-edebug.el: Require edebug and debug.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 13 Sep 2009 15:58:30 +0000
parents 69e6bd939d5a
children 801834237f9c
comparison
equal deleted inserted replaced
104488:7042156f9f43 104489:25e047f7f6a2
1372 Checks if NAMESPACE is an alias and if so, returns a new type 1372 Checks if NAMESPACE is an alias and if so, returns a new type
1373 with a fully qualified name in the original namespace. Returns 1373 with a fully qualified name in the original namespace. Returns
1374 nil if NAMESPACE is not an alias." 1374 nil if NAMESPACE is not an alias."
1375 (when (eq (semantic-tag-get-attribute namespace :kind) 'alias) 1375 (when (eq (semantic-tag-get-attribute namespace :kind) 'alias)
1376 (let ((typename (semantic-analyze-split-name (semantic-tag-name type))) 1376 (let ((typename (semantic-analyze-split-name (semantic-tag-name type)))
1377 ns newtype) 1377 ns nstype originaltype newtype)
1378 ;; Get name of namespace this one's an alias for. 1378 ;; Make typename unqualified
1379 (if (listp typename)
1380 (setq typename (last typename))
1381 (setq typename (list typename)))
1379 (when 1382 (when
1380 (setq ns (semantic-analyze-split-name 1383 (and
1381 (semantic-tag-name 1384 ;; Get original namespace and make sure TYPE exists there.
1382 (car (semantic-tag-get-attribute namespace :members))))) 1385 (setq ns (semantic-tag-name
1386 (car (semantic-tag-get-attribute namespace :members))))
1387 (setq nstype (semanticdb-typecache-find ns))
1388 (setq originaltype (semantic-find-tags-by-name
1389 (car typename)
1390 (semantic-tag-get-attribute nstype :members))))
1383 ;; Construct new type with name in original namespace. 1391 ;; Construct new type with name in original namespace.
1392 (setq ns (semantic-analyze-split-name ns))
1384 (setq newtype 1393 (setq newtype
1385 (semantic-tag-clone 1394 (semantic-tag-clone
1386 type 1395 (car originaltype)
1387 (semantic-analyze-unsplit-name 1396 (semantic-analyze-unsplit-name
1388 (if (listp ns) 1397 (if (listp ns)
1389 (append (butlast ns) (last typename)) 1398 (append ns typename)
1390 (append (list ns) (last typename)))))))))) 1399 (append (list ns) typename)))))))))
1391 1400
1392 ;; This searches a type in a namespace, following through all using 1401 ;; This searches a type in a namespace, following through all using
1393 ;; statements. 1402 ;; statements.
1394 (defun semantic-c-check-type-namespace-using (type namespace) 1403 (defun semantic-c-check-type-namespace-using (type namespace)
1395 "Check if TYPE is accessible in NAMESPACE through a using statement. 1404 "Check if TYPE is accessible in NAMESPACE through a using statement.