Function: semantic-lex-spp-symbol-push

semantic-lex-spp-symbol-push is a byte-compiled function defined in lex-spp.el.gz.

Signature

(semantic-lex-spp-symbol-push NAME VALUE)

Documentation

Push macro NAME with VALUE into the map.

Reverse with semantic-lex-spp-symbol-pop.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex-spp.el.gz
(defun semantic-lex-spp-symbol-push (name value)
  "Push macro NAME with VALUE into the map.
Reverse with `semantic-lex-spp-symbol-pop'."
  (semantic-lex-spp-validate-value name value)
  (let* ((map (semantic-lex-spp-dynamic-map))
	 (stack (semantic-lex-spp-dynamic-map-stack))
	 (mapsym (intern name map))
	 (stacksym (intern name stack))
	 (mapvalue (when (boundp mapsym) (symbol-value mapsym)))
	 )
    (when (boundp mapsym)
      ;; Make sure there is a stack
      (if (not (boundp stacksym)) (set stacksym nil))
      ;; If there is a value to push, then push it.
      (set stacksym (cons mapvalue (symbol-value stacksym)))
      )
    ;; Set our new value here.
    (set mapsym value)
    ))