Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1d6c7cd7
Commit
1d6c7cd7
authored
Jan 16, 2008
by
Alan Mackenzie
Browse files
(c-constant-symbol): Put this defun inside an eval-and-compile, so as to
permit byte-compiling (e.g. in bootstrap).
parent
9302e128
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
lisp/progmodes/cc-vars.el
lisp/progmodes/cc-vars.el
+11
-10
No files found.
lisp/progmodes/cc-vars.el
View file @
1d6c7cd7
...
...
@@ -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 -
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment