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
72b7e664
Commit
72b7e664
authored
Dec 23, 2007
by
Richard M. Stallman
Browse files
(Type Keywords): Uncomment :validate and clarify it.
Improve some of the commented-out keywords' text too.
parent
f862fc9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
23 deletions
+30
-23
lispref/ChangeLog
lispref/ChangeLog
+5
-0
lispref/customize.texi
lispref/customize.texi
+25
-23
No files found.
lispref/ChangeLog
View file @
72b7e664
2007
-
12
-
23
Richard
Stallman
<
rms
@
gnu
.
org
>
*
customize
.
texi
(
Type
Keywords
):
Uncomment
:
validate
and
clarify
it
.
Improve
some
of
the
commented
-
out
keywords
' text too.
2007-12-04 Richard Stallman <rms@gnu.org>
* objects.texi (Symbol Type): Fix typo.
...
...
lispref/customize.texi
View file @
72b7e664
...
...
@@ -1113,6 +1113,16 @@ corresponding value, @var{function}, should be a function that accepts
two
arguments
,
a
widget
and
a
value
;
it
should
return
non
-@
code
{
nil
}
if
the
value
is
acceptable
.
@
item
:
validate
@
var
{
function
}
Specify
a
validation
function
for
input
.
@
var
{
function
}
takes
a
widget
as
an
argument
,
and
should
return
@
code
{
nil
}
if
the
widget
's
current value is valid for the widget. Otherwise, it should return
the widget containing the invalid data, and set that widget'
s
@
code
{:
error
}
property
to
a
string
explaining
the
error
.
In
many
cases
you
can
use
the
function
@
code
{
widget
-
children
-
validate
}
for
this
job
;
it
tests
that
all
children
of
@
var
{
widget
}
are
valid
.
@
ignore
@
item
:
indent
@
var
{
columns
}
Indent
this
item
by
@
var
{
columns
}
columns
.
The
indentation
is
used
for
...
...
@@ -1120,23 +1130,24 @@ Indent this item by @var{columns} columns. The indentation is used for
buttons
,
and
for
editable
lists
.
It
affects
the
whole
of
the
item
except
for
the
first
line
.
@
item
:
offset
@
var
{
columns
}
An
integer
indicating
how
many
extra
spaces
to
indent
the
subitems
of
this
item
.
By
default
,
subitems
are
indented
the
same
as
their
parent
.
@
item
:
offset
@
var
{
extra
}
Indent
the
subitems
of
this
item
@
var
{
extra
}
columns
more
than
this
item
itself
.
By
default
,
subitems
are
indented
the
same
as
their
parent
.
@
item
:
extra
-
offset
A
n
integer
indicating
how
many
extra
spaces
to
add
to
this
item
's
indentation
, compared to its parent
.
@
item
:
extra
-
offset
@
var
{
n
}
A
dd
@
var
{
n
}
extra
spaces
to
this
item
's
indentation, compared to its
parent'
s
indentation
.
@item :notify
A
function
called
each time the item or a subitem is changed. The
function
is called with
two or three arguments. The first argument is
the item
itself, the second argument is the item that was changed, and
the
third argument is the event leading to the change, if any.
@
item
:
notify
@
var
{
function
}
Call
@
var
{
function
}
each
time
the
item
or
a
subitem
is
changed
.
The
function
gets
two
or
three
arguments
.
The
first
argument
is
the
item
itself
,
the
second
argument
is
the
item
that
was
changed
,
and
the
third
argument
is
the
event
leading
to
the
change
,
if
any
.
@item :menu-tag
A tag used
in the menu when the widget is used as an option
in a
@code{menu-choice} widget.
@
item
:
menu
-
tag
@
var
{
tag
-
string
}
Use
@
var
{
tag
-
string
}
in
the
menu
when
the
widget
is
used
as
an
option
in
a
@
code
{
menu
-
choice
}
widget
.
@
item
:
menu
-
tag
-
get
A
function
used
for
finding
the
tag
when
the
widget
is
used
as
an
option
...
...
@@ -1144,15 +1155,6 @@ in a @code{menu-choice} widget. By default, the tag used will be either the
@
code
{:
menu
-
tag
}
or
@
code
{:
tag
}
property
if
present
,
or
the
@
code
{
princ
}
representation
of
the
@
code
{:
value
}
property
if
not
.
@item :validate
A function which takes a widget as an argument, and return @code{nil}
if the widget'
s
current
value
is
valid
for
the
widget
.
Otherwise
,
it
should
return
the
widget
containing
the
invalid
data
,
and
set
that
widget
's @code{:error} property to a string explaining the error.
You can use the function @code{widget-children-validate} for this job;
it tests that all children of @var{widget} are valid.
@
item
:
tab
-
order
Specify
the
order
in
which
widgets
are
traversed
with
@
code
{
widget
-
forward
}
or
@
code
{
widget
-
backward
}.
This
is
only
partially
...
...
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