summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2008-01-16 21:26:59 +0000
committerAlan Mackenzie <acm@muc.de>2008-01-16 21:26:59 +0000
commit1d6c7cd7ee40709f25c6e24a2daffbfbc226efc3 (patch)
tree94cced9ddc77cc796ba4beb104bd57769fdcf6ed
parent9302e128c967ebb06e05bfac3fbd3525784b5631 (diff)
downloademacs-1d6c7cd7ee40709f25c6e24a2daffbfbc226efc3.tar.gz
(c-constant-symbol): Put this defun inside an eval-and-compile, so as to
permit byte-compiling (e.g. in bootstrap).
-rw-r--r--lisp/progmodes/cc-vars.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 6ba2281f344..7596dc60b5f 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -74,22 +74,23 @@ Useful as last item in a `choice' widget."
:value 'other))
;; The next defun will supersede c-const-symbol.
-(defun c-constant-symbol (sym len)
- "Create an uneditable symbol for customization buffers.
+(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)))
+ (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))))
(define-widget 'c-const-symbol 'item
"An uneditable lisp symbol. This is obsolete -