diff options
| author | Dave Love | 2000-01-05 23:24:32 +0000 |
|---|---|---|
| committer | Dave Love | 2000-01-05 23:24:32 +0000 |
| commit | 54438eb5036d254ea1d00555a408b01a6687f55c (patch) | |
| tree | 33d4357f8d0d1b1143163132a92ceff1dc2c5eb2 | |
| parent | e7f961bc4bd3a39a44d2d104c9a58ad90040d18a (diff) | |
| download | emacs-54438eb5036d254ea1d00555a408b01a6687f55c.tar.gz emacs-54438eb5036d254ea1d00555a408b01a6687f55c.zip | |
English fixes.
| -rw-r--r-- | man/widget.texi | 90 |
1 files changed, 44 insertions, 46 deletions
diff --git a/man/widget.texi b/man/widget.texi index aa7897395a7..02e531e2834 100644 --- a/man/widget.texi +++ b/man/widget.texi | |||
| @@ -19,8 +19,6 @@ | |||
| 19 | @comment node-name, next, previous, up | 19 | @comment node-name, next, previous, up |
| 20 | @top The Emacs Widget Library | 20 | @top The Emacs Widget Library |
| 21 | 21 | ||
| 22 | Version: 1.9914 | ||
| 23 | |||
| 24 | @menu | 22 | @menu |
| 25 | * Introduction:: | 23 | * Introduction:: |
| 26 | * User Interface:: | 24 | * User Interface:: |
| @@ -468,7 +466,7 @@ The text inside will be displayed with the face specified by | |||
| 468 | @code{:sample-face}. | 466 | @code{:sample-face}. |
| 469 | 467 | ||
| 470 | @item %v | 468 | @item %v |
| 471 | This will be replaces with the buffer representation of the widgets | 469 | This will be replaced with the buffer representation of the widget's |
| 472 | value. What this is depends on the widget type. | 470 | value. What this is depends on the widget type. |
| 473 | 471 | ||
| 474 | @item %d | 472 | @item %d |
| @@ -562,8 +560,8 @@ and returning non-nil if the widget can represent the specified value. | |||
| 562 | 560 | ||
| 563 | @item :validate | 561 | @item :validate |
| 564 | A function which takes a widget as an argument, and return nil if the | 562 | A function which takes a widget as an argument, and return nil if the |
| 565 | widgets current value is valid for the widget. Otherwise, it should | 563 | widget's current value is valid for the widget. Otherwise it should |
| 566 | return the widget containing the invalid data, and set that widgets | 564 | return the widget containing the invalid data, and set that widget's |
| 567 | @code{:error} property to a string explaining the error. | 565 | @code{:error} property to a string explaining the error. |
| 568 | 566 | ||
| 569 | The following predefined function can be used: | 567 | The following predefined function can be used: |
| @@ -679,7 +677,7 @@ Syntax: | |||
| 679 | TYPE ::= (info-link [KEYWORD ARGUMENT]... ADDRESS) | 677 | TYPE ::= (info-link [KEYWORD ARGUMENT]... ADDRESS) |
| 680 | @end example | 678 | @end example |
| 681 | 679 | ||
| 682 | When this link is invoked, the build-in info browser is started on | 680 | When this link is invoked, the built-in info browser is started on |
| 683 | @var{address}. | 681 | @var{address}. |
| 684 | 682 | ||
| 685 | @node push-button, editable-field, info-link, Basic Types | 683 | @node push-button, editable-field, info-link, Basic Types |
| @@ -766,10 +764,10 @@ Syntax: | |||
| 766 | TYPE ::= (menu-choice [KEYWORD ARGUMENT]... TYPE ... ) | 764 | TYPE ::= (menu-choice [KEYWORD ARGUMENT]... TYPE ... ) |
| 767 | @end example | 765 | @end example |
| 768 | 766 | ||
| 769 | The @var{type} arguments represents each possible choice. The widgets | 767 | The @var{type} argument represents each possible choice. The widget's |
| 770 | value of will be the value of the chosen @var{type} argument. This | 768 | value will be that of the chosen @var{type} argument. This widget will |
| 771 | widget will match any value that matches at least one of the specified | 769 | match any value matching at least one of the specified @var{type} |
| 772 | @var{type} arguments. | 770 | arguments. |
| 773 | 771 | ||
| 774 | @table @code | 772 | @table @code |
| 775 | @item :void | 773 | @item :void |
| @@ -801,10 +799,10 @@ Syntax: | |||
| 801 | TYPE ::= (radio-button-choice [KEYWORD ARGUMENT]... TYPE ... ) | 799 | TYPE ::= (radio-button-choice [KEYWORD ARGUMENT]... TYPE ... ) |
| 802 | @end example | 800 | @end example |
| 803 | 801 | ||
| 804 | The @var{type} arguments represents each possible choice. The widgets | 802 | The @var{type} argument represents each possible choice. The widget's |
| 805 | value of will be the value of the chosen @var{type} argument. This | 803 | value will be that of the chosen @var{type} argument. This widget will |
| 806 | widget will match any value that matches at least one of the specified | 804 | match any value matching at least one of the specified @var{type} |
| 807 | @var{type} arguments. | 805 | arguments. |
| 808 | 806 | ||
| 809 | The following extra properties are recognized. | 807 | The following extra properties are recognized. |
| 810 | 808 | ||
| @@ -891,8 +889,8 @@ Syntax: | |||
| 891 | TYPE ::= (toggle [KEYWORD ARGUMENT]...) | 889 | TYPE ::= (toggle [KEYWORD ARGUMENT]...) |
| 892 | @end example | 890 | @end example |
| 893 | 891 | ||
| 894 | The widget has two possible states, `on' and `off', which corresponds to | 892 | The widget has two possible states, `on' and `off', which correspond to |
| 895 | a @code{t} or @code{nil} value. | 893 | a @code{t} or @code{nil} value respectively. |
| 896 | 894 | ||
| 897 | The following extra properties are recognized. | 895 | The following extra properties are recognized. |
| 898 | 896 | ||
| @@ -932,10 +930,10 @@ Syntax: | |||
| 932 | TYPE ::= (checklist [KEYWORD ARGUMENT]... TYPE ... ) | 930 | TYPE ::= (checklist [KEYWORD ARGUMENT]... TYPE ... ) |
| 933 | @end example | 931 | @end example |
| 934 | 932 | ||
| 935 | The @var{type} arguments represents each checklist item. The widgets | 933 | The @var{type} arguments represents each checklist item. The widget's |
| 936 | value of will be a list containing the value of each ticked @var{type} | 934 | value will be a list containing the values of all ticked @var{type} |
| 937 | argument. The checklist widget will match a list whose elements all | 935 | arguments. The checklist widget will match a list whose elements all |
| 938 | matches at least one of the specified @var{type} arguments. | 936 | match at least one of the specified @var{type} arguments. |
| 939 | 937 | ||
| 940 | The following extra properties are recognized. | 938 | The following extra properties are recognized. |
| 941 | 939 | ||
| @@ -953,11 +951,11 @@ Insert a literal @samp{%}. | |||
| 953 | @end table | 951 | @end table |
| 954 | 952 | ||
| 955 | @item :greedy | 953 | @item :greedy |
| 956 | Usually, a checklist will only match if the items are in the exact | 954 | Usually a checklist will only match if the items are in the exact |
| 957 | sequence given in the specification. By setting @code{:greedy} to | 955 | sequence given in the specification. By setting @code{:greedy} to |
| 958 | non-nil, it will allow the items to come in any sequence. However, if | 956 | non-nil, it will allow the items to come in any sequence. However, if |
| 959 | you extract the value they will be in the sequence given in the | 957 | you extract the value they will be in the sequence given in the |
| 960 | checklist. I.e. the original sequence is forgotten. | 958 | checklist. I.e. the original sequence is forgotten. |
| 961 | 959 | ||
| 962 | @item button-args | 960 | @item button-args |
| 963 | A list of keywords to pass to the checkboxes. Useful for setting | 961 | A list of keywords to pass to the checkboxes. Useful for setting |
| @@ -1238,13 +1236,13 @@ The value of a widget of this type will either have the form | |||
| 1238 | @samp{(file t)} or @code{(file string string)}. | 1236 | @samp{(file t)} or @code{(file string string)}. |
| 1239 | 1237 | ||
| 1240 | This concept of inline is probably hard to understand. It was certainly | 1238 | This concept of inline is probably hard to understand. It was certainly |
| 1241 | hard to implement so instead of confuse you more by trying to explain it | 1239 | hard to implement so instead of confusing you more by trying to explain |
| 1242 | here, I'll just suggest you meditate over it for a while. | 1240 | it here, I'll just suggest you meditate over it for a while. |
| 1243 | 1241 | ||
| 1244 | @deffn Widget choice | 1242 | @deffn Widget choice |
| 1245 | Allows you to edit a sexp which may have one of fixed set of types. It | 1243 | Allows you to edit a sexp which may have one of a fixed set of types. |
| 1246 | is currently implemented with the @code{choice-menu} basic widget, and | 1244 | It is currently implemented with the @code{choice-menu} basic widget, |
| 1247 | has a similar syntax. | 1245 | and has a similar syntax. |
| 1248 | @end deffn | 1246 | @end deffn |
| 1249 | 1247 | ||
| 1250 | @deffn Widget set | 1248 | @deffn Widget set |
| @@ -1328,9 +1326,9 @@ You can query or set the state with the following code: | |||
| 1328 | (widget-apply @var{widget} :activate) | 1326 | (widget-apply @var{widget} :activate) |
| 1329 | @end lisp | 1327 | @end lisp |
| 1330 | 1328 | ||
| 1331 | A widget is inactive if itself, or any of its ancestors (found by | 1329 | A widget is inactive if it, or any of its ancestors (found by |
| 1332 | following the @code{:parent} link) have been deactivated. To make sure | 1330 | following the @code{:parent} link), have been deactivated. To make sure |
| 1333 | a widget is really active, you must therefore activate both itself, and | 1331 | a widget is really active, you must therefore activate both it and |
| 1334 | all its ancestors. | 1332 | all its ancestors. |
| 1335 | 1333 | ||
| 1336 | @lisp | 1334 | @lisp |
| @@ -1340,12 +1338,12 @@ all its ancestors. | |||
| 1340 | @end lisp | 1338 | @end lisp |
| 1341 | 1339 | ||
| 1342 | You can check if a widget has been made inactive by examining the value | 1340 | You can check if a widget has been made inactive by examining the value |
| 1343 | of @code{:inactive} keyword. If this is non-nil, the widget itself has | 1341 | of the @code{:inactive} keyword. If this is non-nil, the widget itself |
| 1344 | been deactivated. This is different from using the @code{:active} | 1342 | has been deactivated. This is different from using the @code{:active} |
| 1345 | keyword, in that the later tell you if the widget @strong{or} any of its | 1343 | keyword, in that the latter tells you if the widget @strong{or} any of |
| 1346 | ancestors have been deactivated. Do not attempt to set the | 1344 | its ancestors have been deactivated. Do not attempt to set the |
| 1347 | @code{:inactive} keyword directly. Use the @code{:activate} | 1345 | @code{:inactive} keyword directly. Use the @code{:activate} |
| 1348 | @code{:deactivated} keywords instead. | 1346 | @code{:deactivate} keywords instead. |
| 1349 | 1347 | ||
| 1350 | 1348 | ||
| 1351 | @node Defining New Widgets, Widget Browser, Widget Properties, Top | 1349 | @node Defining New Widgets, Widget Browser, Widget Properties, Top |
| @@ -1354,7 +1352,7 @@ ancestors have been deactivated. Do not attempt to set the | |||
| 1354 | 1352 | ||
| 1355 | You can define specialized widgets with @code{define-widget}. It allows | 1353 | You can define specialized widgets with @code{define-widget}. It allows |
| 1356 | you to create a shorthand for more complex widgets, including specifying | 1354 | you to create a shorthand for more complex widgets, including specifying |
| 1357 | component widgets and default new default values for the keyword | 1355 | component widgets and new default values for the keyword |
| 1358 | arguments. | 1356 | arguments. |
| 1359 | 1357 | ||
| 1360 | @defun widget-define name class doc &rest args | 1358 | @defun widget-define name class doc &rest args |
| @@ -1382,8 +1380,8 @@ create identical widgets: | |||
| 1382 | 1380 | ||
| 1383 | @end defun | 1381 | @end defun |
| 1384 | 1382 | ||
| 1385 | Using @code{widget-define} does just store the definition of the widget | 1383 | Using @code{widget-define} just stores the definition of the widget type |
| 1386 | type in the @code{widget-type} property of @var{name}, which is what | 1384 | in the @code{widget-type} property of @var{name}, which is what |
| 1387 | @code{widget-create} uses. | 1385 | @code{widget-create} uses. |
| 1388 | 1386 | ||
| 1389 | If you just want to specify defaults for keywords with no complex | 1387 | If you just want to specify defaults for keywords with no complex |
| @@ -1396,7 +1394,7 @@ widgets: | |||
| 1396 | Function to convert a widget type before creating a widget of that | 1394 | Function to convert a widget type before creating a widget of that |
| 1397 | type. It takes a widget type as an argument, and returns the converted | 1395 | type. It takes a widget type as an argument, and returns the converted |
| 1398 | widget type. When a widget is created, this function is called for the | 1396 | widget type. When a widget is created, this function is called for the |
| 1399 | widget type and all the widgets parent types, most derived first. | 1397 | widget type and all the widget's parent types, most derived first. |
| 1400 | 1398 | ||
| 1401 | The following predefined functions can be used here: | 1399 | The following predefined functions can be used here: |
| 1402 | 1400 | ||
| @@ -1424,8 +1422,8 @@ when the widget is created, and on any value set later with | |||
| 1424 | 1422 | ||
| 1425 | @item :create | 1423 | @item :create |
| 1426 | Function to create a widget from scratch. The function takes one | 1424 | Function to create a widget from scratch. The function takes one |
| 1427 | argument, a widget type, and create a widget of that type, insert it in | 1425 | argument, a widget type, and creates a widget of that type, inserts it |
| 1428 | the buffer, and return a widget object. | 1426 | in the buffer, and returns a widget object. |
| 1429 | 1427 | ||
| 1430 | @item :delete | 1428 | @item :delete |
| 1431 | Function to delete a widget. The function takes one argument, a widget, | 1429 | Function to delete a widget. The function takes one argument, a widget, |
| @@ -1433,14 +1431,14 @@ and should remove all traces of the widget from the buffer. | |||
| 1433 | 1431 | ||
| 1434 | @item :value-create | 1432 | @item :value-create |
| 1435 | Function to expand the @samp{%v} escape in the format string. It will | 1433 | Function to expand the @samp{%v} escape in the format string. It will |
| 1436 | be called with the widget as its argument. Should | 1434 | be called with the widget as its argument and should insert a |
| 1437 | insert a representation of the widgets value in the buffer. | 1435 | representation of the widget's value in the buffer. |
| 1438 | 1436 | ||
| 1439 | @item :value-delete | 1437 | @item :value-delete |
| 1440 | Should remove the representation of the widgets value from the buffer. | 1438 | Should remove the representation of the widget's value from the buffer. |
| 1441 | It will be called with the widget as its argument. It doesn't have to | 1439 | It will be called with the widget as its argument. It doesn't have to |
| 1442 | remove the text, but it should release markers and delete nested widgets | 1440 | remove the text, but it should release markers and delete nested widgets |
| 1443 | if such has been used. | 1441 | if such have been used. |
| 1444 | 1442 | ||
| 1445 | The following predefined function can be used here: | 1443 | The following predefined function can be used here: |
| 1446 | 1444 | ||
| @@ -1483,7 +1481,7 @@ Function to prompt for a value in the minibuffer. The function should | |||
| 1483 | take four arguments, @var{widget}, @var{prompt}, @var{value}, and | 1481 | take four arguments, @var{widget}, @var{prompt}, @var{value}, and |
| 1484 | @var{unbound} and should return a value for widget entered by the user. | 1482 | @var{unbound} and should return a value for widget entered by the user. |
| 1485 | @var{prompt} is the prompt to use. @var{value} is the default value to | 1483 | @var{prompt} is the prompt to use. @var{value} is the default value to |
| 1486 | use, unless @var{unbound} is non-nil in which case there are no default | 1484 | use, unless @var{unbound} is non-nil, in which case there is no default |
| 1487 | value. The function should read the value using the method most natural | 1485 | value. The function should read the value using the method most natural |
| 1488 | for this widget, and does not have to check that it matches. | 1486 | for this widget, and does not have to check that it matches. |
| 1489 | @end table | 1487 | @end table |