Function: idlwave-new-sintern-type

idlwave-new-sintern-type is a macro defined in idlwave.el.gz.

Signature

(idlwave-new-sintern-type TAG)

Documentation

Define a variable and a function to sintern the new type TAG.

This defines the function idlwave-sintern-TAG and the variable idlwave-sint-TAGs.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/idlwave.el.gz
;; Creating new sintern tables

(defmacro idlwave-new-sintern-type (tag)
  "Define a variable and a function to sintern the new type TAG.
This defines the function `idlwave-sintern-TAG' and the variable
`idlwave-sint-TAGs'."
  (let* ((name (symbol-name tag))
	 (names (concat name "s"))
	 (var (intern (concat "idlwave-sint-" names)))
	 (func (intern (concat "idlwave-sintern-" name))))
    `(progn
       (defvar ,var nil)        ; initial value of the association list
       (defun ,func (name &optional set)
	 (cond ((not (stringp name)) name)
	       ((cdr (assoc (downcase name) ,var)))
	       (set
		(push (cons (downcase name) name) ,var)
		name)
	       (name))))))