Function: semantic-lex-make-keyword-table

semantic-lex-make-keyword-table is a byte-compiled function defined in lex.el.gz.

Signature

(semantic-lex-make-keyword-table SPECS &optional PROPSPECS)

Documentation

Convert keyword SPECS into an obarray and return it.

SPECS must be a list of (NAME . TOKSYM) elements, where:

  NAME is the name of the keyword symbol to define.
  TOKSYM is the lexical token symbol of that keyword.

If optional argument PROPSPECS is non-nil, then interpret it, and apply those properties. PROPSPECS must be a list of (NAME PROPERTY VALUE) elements.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex.el.gz
(defun semantic-lex-make-keyword-table (specs &optional propspecs)
  "Convert keyword SPECS into an obarray and return it.
SPECS must be a list of (NAME . TOKSYM) elements, where:

  NAME is the name of the keyword symbol to define.
  TOKSYM is the lexical token symbol of that keyword.

If optional argument PROPSPECS is non-nil, then interpret it, and
apply those properties.
PROPSPECS must be a list of (NAME PROPERTY VALUE) elements."
  ;; Create the symbol hash table
  (let ((semantic-flex-keywords-obarray (obarray-make 13))
        spec)
    ;; fill it with stuff
    (while specs
      (setq spec  (car specs)
            specs (cdr specs))
      (semantic-lex-keyword-set (car spec) (cdr spec)))
    ;; Apply all properties
    (while propspecs
      (setq spec (car propspecs)
            propspecs (cdr propspecs))
      (semantic-lex-keyword-put (car spec) (nth 1 spec) (nth 2 spec)))
    semantic-flex-keywords-obarray))