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
a075569a
Commit
a075569a
authored
Jun 19, 2004
by
Luc Teirlinck
Browse files
(custom-variable-documentation): New function.
(custom-variable): Use it.
parent
331fbb7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
lisp/cus-edit.el
lisp/cus-edit.el
+15
-1
No files found.
lisp/cus-edit.el
View file @
a075569a
...
...
@@ -2074,11 +2074,25 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
:group 'custom-buffer
:version "
20.3
")
(defun custom-variable-documentation (variable)
"
Return
documentation
of
VARIABLE
for
use
in
Custom
buffer.
Normally
just
return
the
docstring.
But
if
VARIABLE
automatically
becomes
buffer
local
when
set,
append
a
message
to
that
effect.
"
(if (and (local-variable-if-set-p variable)
(or (not (local-variable-p variable))
(with-temp-buffer
(local-variable-if-set-p variable))))
(concat (documentation-property variable 'variable-documentation)
"
\n
This
variable
automatically
becomes
buffer-local
when
set
outside
Custom.
However,
setting
it
through
Custom
sets
the
default
value.
")
(documentation-property variable 'variable-documentation)))
(define-widget 'custom-variable 'custom
"
Customize
variable.
"
:format "
%v
"
:help-echo "
Set
or
reset
this
variable.
"
:documentation-property
'
variable-documentation
:documentation-property
#'custom-
variable-documentation
:custom-category 'option
:custom-state nil
:custom-menu 'custom-variable-menu-create
...
...
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