Function: c-constant-symbol
c-constant-symbol is a byte-compiled function defined in
cc-vars.el.gz.
Signature
(c-constant-symbol SYM LEN)
Documentation
Create an uneditable symbol for customization buffers.
SYM is the name of the symbol, LEN the length of the field (in characters) the symbol will be displayed in. LEN must be big enough.
This returns a (const ....) structure, suitable for embedding within a customization type.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-vars.el.gz
;; The next defun will supersede c-const-symbol.
(eval-and-compile
(defun c-constant-symbol (sym len)
"Create an uneditable symbol for customization buffers.
SYM is the name of the symbol, LEN the length of the field (in
characters) the symbol will be displayed in. LEN must be big
enough.
This returns a (const ....) structure, suitable for embedding
within a customization type."
(or (symbolp sym) (error "c-constant-symbol: %s is not a symbol" sym))
(let* ((name (symbol-name sym))
(l (length name))
(disp (concat name ":" (make-string (- len l 1) ?\ ))))
`(const
:size ,len
:format ,disp
:value ,sym))))