diff lisp/cedet/semantic/lex-spp.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 df08b7ab0ba0
children 8db96f200ac8
line wrap: on
line diff
--- a/lisp/cedet/semantic/lex-spp.el	Fri Sep 11 01:17:46 2009 +0000
+++ b/lisp/cedet/semantic/lex-spp.el	Sun Sep 13 15:58:30 2009 +0000
@@ -834,14 +834,18 @@
 
 	(nreverse toks)))))
 
+(defvar semantic-lex-spp-hack-depth 0
+  "Current depth of recursive calls to `semantic-lex-spp-lex-text-string'.")
+
 (defun semantic-lex-spp-lex-text-string (text)
   "Lex the text string TEXT using the current buffer's state.
 Use this to parse text extracted from a macro as if it came from
 the current buffer.  Since the lexer is designed to only work in
 a buffer, we need to create a new buffer, and populate it with rules
 and variable state from the current buffer."
-  ;; @TODO - will this fcn recurse?
-  (let* ((buf (get-buffer-create " *SPP parse hack*"))
+  (let* ((semantic-lex-spp-hack-depth (1+ semantic-lex-spp-hack-depth))
+	 (buf (get-buffer-create (format " *SPP parse hack %d*"
+					 semantic-lex-spp-hack-depth)))
 	 (mode major-mode)
 	 (fresh-toks nil)
 	 (toks nil)