Mercurial > emacs
comparison lisp/progmodes/cc-vars.el @ 87772:d8143a93113f
(c-constant-symbol): Put this defun inside an eval-and-compile, so as to
permit byte-compiling (e.g. in bootstrap).
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Tue, 15 Jan 2008 23:56:38 +0000 |
parents | 5b0f1e2a7271 |
children | 5d58981e6690 |
comparison
equal
deleted
inserted
replaced
87771:242c61284e79 | 87772:d8143a93113f |
---|---|
72 :tag "Other" | 72 :tag "Other" |
73 :format "%t%n" | 73 :format "%t%n" |
74 :value 'other)) | 74 :value 'other)) |
75 | 75 |
76 ;; The next defun will supersede c-const-symbol. | 76 ;; The next defun will supersede c-const-symbol. |
77 (defun c-constant-symbol (sym len) | 77 (eval-and-compile |
78 (defun c-constant-symbol (sym len) | |
78 "Create an uneditable symbol for customization buffers. | 79 "Create an uneditable symbol for customization buffers. |
79 SYM is the name of the symbol, LEN the length of the field (in | 80 SYM is the name of the symbol, LEN the length of the field (in |
80 characters) the symbol will be displayed in. LEN must be big | 81 characters) the symbol will be displayed in. LEN must be big |
81 enough. | 82 enough. |
82 | 83 |
87 (l (length name)) | 88 (l (length name)) |
88 (disp (concat name ":" (make-string (- len l 1) ?\ )))) | 89 (disp (concat name ":" (make-string (- len l 1) ?\ )))) |
89 `(const | 90 `(const |
90 :size ,len | 91 :size ,len |
91 :format ,disp | 92 :format ,disp |
92 :value ,sym))) | 93 :value ,sym)))) |
93 | 94 |
94 (define-widget 'c-const-symbol 'item | 95 (define-widget 'c-const-symbol 'item |
95 "An uneditable lisp symbol. This is obsolete - | 96 "An uneditable lisp symbol. This is obsolete - |
96 use c-constant-symbol instead." | 97 use c-constant-symbol instead." |
97 :value nil | 98 :value nil |