Function: semantic-lex-with-macro-used

semantic-lex-with-macro-used is a macro defined in lex-spp.el.gz.

Signature

(semantic-lex-with-macro-used NAME &rest BODY)

Documentation

With the macro NAME currently being expanded, execute BODY.

Pushes NAME into the macro stack. The above stack is checked by semantic-lex-spp-symbol to not return true for any symbol currently being expanded.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex-spp.el.gz
;; The above is not buffer local.  Some macro expansions need to be
;; dumped into a secondary buffer for re-lexing.

;;; NON-RECURSIVE MACRO STACK
;; C Pre-processor does not allow recursive macros.  Here are some utils
;; for managing the symbol stack of where we've been.

(defmacro semantic-lex-with-macro-used (name &rest body)
  "With the macro NAME currently being expanded, execute BODY.
Pushes NAME into the macro stack.  The above stack is checked
by `semantic-lex-spp-symbol' to not return true for any symbol
currently being expanded."
  (declare (indent 1) (debug (symbolp def-body)))
  `(unwind-protect
       (progn
	 (push ,name semantic-lex-spp-expanded-macro-stack)
	 ,@body)
     (pop semantic-lex-spp-expanded-macro-stack)))