diff options
| author | Paul Eggert | 2012-12-14 12:05:03 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-12-14 12:05:03 -0800 |
| commit | cccaebd24d257278c31493e10a7a837ddb12fc4f (patch) | |
| tree | b88427373bd9f7afac6b575979cc340f73a42d47 /doc/misc/srecode.texi | |
| parent | 7e90af267484ac6f286e91f55d38a31dd36c2395 (diff) | |
| download | emacs-cccaebd24d257278c31493e10a7a837ddb12fc4f.tar.gz emacs-cccaebd24d257278c31493e10a7a837ddb12fc4f.zip | |
Spelling fixes.
My favorite was that the word "dictionary" was misspelled.
Also, correct the title in the DeRemer & Pennello 1982 citation,
and add a URL.
Diffstat (limited to 'doc/misc/srecode.texi')
| -rw-r--r-- | doc/misc/srecode.texi | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/doc/misc/srecode.texi b/doc/misc/srecode.texi index 10a0d8770dc..a6e4d73cc69 100644 --- a/doc/misc/srecode.texi +++ b/doc/misc/srecode.texi | |||
| @@ -226,7 +226,7 @@ template files, and determining which templates are relevant to the | |||
| 226 | current buffer. Template files are sorted by priority, with user | 226 | current buffer. Template files are sorted by priority, with user |
| 227 | templates being found first, and system level default templates last. | 227 | templates being found first, and system level default templates last. |
| 228 | Templates are also sorted by application. Each application has its | 228 | Templates are also sorted by application. Each application has its |
| 229 | own templates, and are kept seperate from the generic templates. | 229 | own templates, and are kept separate from the generic templates. |
| 230 | 230 | ||
| 231 | @section Dictionary | 231 | @section Dictionary |
| 232 | Dictionaries contain values associated with variable. Variables are | 232 | Dictionaries contain values associated with variable. Variables are |
| @@ -312,7 +312,7 @@ template to be inserted again. | |||
| 312 | 312 | ||
| 313 | By default, when inserting a template, if the user needs to enter text | 313 | By default, when inserting a template, if the user needs to enter text |
| 314 | to fill in a part of the template, then the minibuffer is used to | 314 | to fill in a part of the template, then the minibuffer is used to |
| 315 | query for that information. SRecode also supports a field-edting mode | 315 | query for that information. SRecode also supports a field-editing mode |
| 316 | that can be used instead. To enable it set: | 316 | that can be used instead. To enable it set: |
| 317 | 317 | ||
| 318 | @defun srecode-insert-ask-variable-method | 318 | @defun srecode-insert-ask-variable-method |
| @@ -344,7 +344,7 @@ Once the cursor moves out of the are inserted by the template, all the | |||
| 344 | fields are cancelled. | 344 | fields are cancelled. |
| 345 | 345 | ||
| 346 | @b{NOTE}: Some conveniences in templates, such as completion, or | 346 | @b{NOTE}: Some conveniences in templates, such as completion, or |
| 347 | character restrictins are lost when using field editing mode. | 347 | character restrictions are lost when using field editing mode. |
| 348 | 348 | ||
| 349 | @node Template Writing | 349 | @node Template Writing |
| 350 | @chapter Template Writing | 350 | @chapter Template Writing |
| @@ -401,7 +401,7 @@ set VARNAME "some value" | |||
| 401 | @end example | 401 | @end example |
| 402 | 402 | ||
| 403 | Note that a VARIABLE is a name in a dictionary that can be used in a | 403 | Note that a VARIABLE is a name in a dictionary that can be used in a |
| 404 | MACRO in a template. The macro referernces some variable by name. | 404 | MACRO in a template. The macro references some variable by name. |
| 405 | 405 | ||
| 406 | @menu | 406 | @menu |
| 407 | * String Values:: Basic Variable values | 407 | * String Values:: Basic Variable values |
| @@ -420,7 +420,7 @@ other characters. Strings are interpreted by the Emacs Lisp reader so | |||
| 420 | @code{\n}, @code{\t}, and @code{\"} work. | 420 | @code{\n}, @code{\t}, and @code{\"} work. |
| 421 | 421 | ||
| 422 | When a string is inserted as part of a template, nothing within the | 422 | When a string is inserted as part of a template, nothing within the |
| 423 | string is interperted, such as template escape characters. | 423 | string is interpreted, such as template escape characters. |
| 424 | 424 | ||
| 425 | @node Multi-string Values | 425 | @node Multi-string Values |
| 426 | @subsection Multi-string Values | 426 | @subsection Multi-string Values |
| @@ -545,7 +545,7 @@ Any template file that has a project specified will get have a | |||
| 545 | priority that is set between SRecode base templates, and user defined | 545 | priority that is set between SRecode base templates, and user defined |
| 546 | templates. | 546 | templates. |
| 547 | 547 | ||
| 548 | Templates can be compiled via a project system, such as EDE. EDE | 548 | Templates can be compiled via a project system, such as EDE@. EDE |
| 549 | loaded templates will get a @var{project} set automatically. | 549 | loaded templates will get a @var{project} set automatically. |
| 550 | 550 | ||
| 551 | Example: | 551 | Example: |
| @@ -599,7 +599,7 @@ variables from Lisp. | |||
| 599 | A template represents a text pattern that can be inserted into | 599 | A template represents a text pattern that can be inserted into |
| 600 | a buffer. | 600 | a buffer. |
| 601 | 601 | ||
| 602 | A basic template is declaired like this: | 602 | A basic template is declared like this: |
| 603 | 603 | ||
| 604 | @example | 604 | @example |
| 605 | template TEMPLATENAME :arg1 :arg2 | 605 | template TEMPLATENAME :arg1 :arg2 |
| @@ -621,7 +621,7 @@ contain the text "-----". | |||
| 621 | 621 | ||
| 622 | @menu | 622 | @menu |
| 623 | * Template Section Dictionaries:: Template Scoped Macro values | 623 | * Template Section Dictionaries:: Template Scoped Macro values |
| 624 | * Template Macros:: Macros occuring in template patterns | 624 | * Template Macros:: Macros occurring in template patterns |
| 625 | @end menu | 625 | @end menu |
| 626 | 626 | ||
| 627 | @node Template Section Dictionaries | 627 | @node Template Section Dictionaries |
| @@ -644,7 +644,7 @@ An end line | |||
| 644 | @end example | 644 | @end example |
| 645 | 645 | ||
| 646 | In this example, the @var{NAME} variable gets the value ``foo'', but | 646 | In this example, the @var{NAME} variable gets the value ``foo'', but |
| 647 | only while it is inside section macro A. The outer scoped NAME will | 647 | only while it is inside section macro A@. The outer scoped NAME will |
| 648 | be empty. | 648 | be empty. |
| 649 | 649 | ||
| 650 | This is particularly useful while using an include macro to pull in a | 650 | This is particularly useful while using an include macro to pull in a |
| @@ -847,7 +847,7 @@ template foo | |||
| 847 | 847 | ||
| 848 | context C2 | 848 | context C2 |
| 849 | 849 | ||
| 850 | temlate foo | 850 | template foo |
| 851 | "Foo template in C2" | 851 | "Foo template in C2" |
| 852 | ---- | 852 | ---- |
| 853 | ---- | 853 | ---- |
| @@ -858,13 +858,13 @@ C1. The second is available in context C2. | |||
| 858 | 858 | ||
| 859 | This is useful if there are multiple ways to declare something like a | 859 | This is useful if there are multiple ways to declare something like a |
| 860 | function or variable that differ only by where it is in the syntax of | 860 | function or variable that differ only by where it is in the syntax of |
| 861 | the lanugage. The name @code{foo} is not ambiguous because each is in | 861 | the language. The name @code{foo} is not ambiguous because each is in |
| 862 | a different context. | 862 | a different context. |
| 863 | 863 | ||
| 864 | @node Prompts | 864 | @node Prompts |
| 865 | @section Prompt | 865 | @section Prompt |
| 866 | 866 | ||
| 867 | Some templates use promtping macro insertion. A macro that needs a | 867 | Some templates use prompting macro insertion. A macro that needs a |
| 868 | prompt looks like this: | 868 | prompt looks like this: |
| 869 | 869 | ||
| 870 | @example | 870 | @example |
| @@ -881,7 +881,7 @@ Specify NAME: | |||
| 881 | 881 | ||
| 882 | For such macros, you can pre-define prompts for any dictionary entry. | 882 | For such macros, you can pre-define prompts for any dictionary entry. |
| 883 | When that dictionary entry is first encountered, the user is prompted, | 883 | When that dictionary entry is first encountered, the user is prompted, |
| 884 | and subsequent occurances of that dictionary entry use the same value. | 884 | and subsequent occurrences of that dictionary entry use the same value. |
| 885 | 885 | ||
| 886 | To get a different prompt, use a prompt command like this: | 886 | To get a different prompt, use a prompt command like this: |
| 887 | 887 | ||
| @@ -926,7 +926,7 @@ need to use the @code{defaultmacro} keyword instead. | |||
| 926 | prompt VARNAME "Varname: " defaultmacro "PREFIX" | 926 | prompt VARNAME "Varname: " defaultmacro "PREFIX" |
| 927 | @end example | 927 | @end example |
| 928 | 928 | ||
| 929 | now, when it attempts to read in VARNAME, it will pre-populte the text | 929 | now, when it attempts to read in VARNAME, it will pre-populate the text |
| 930 | editing section with whatever the value of PREFIX is. | 930 | editing section with whatever the value of PREFIX is. |
| 931 | 931 | ||
| 932 | Some language arguments may supply possible prefixes for prompts. | 932 | Some language arguments may supply possible prefixes for prompts. |
| @@ -972,7 +972,7 @@ When building an @srecode{} based application, you will need to setup | |||
| 972 | your dictionary values yourself. There are several utility functions | 972 | your dictionary values yourself. There are several utility functions |
| 973 | for this. | 973 | for this. |
| 974 | 974 | ||
| 975 | In the simplest form, you can assocate a string with a variable. | 975 | In the simplest form, you can associate a string with a variable. |
| 976 | 976 | ||
| 977 | @defun srecode-dictionary-set-value dict name value | 977 | @defun srecode-dictionary-set-value dict name value |
| 978 | @anchor{srecode-dictionary-set-value} | 978 | @anchor{srecode-dictionary-set-value} |
| @@ -997,8 +997,9 @@ You can add several dictionaries to the same section entry. | |||
| 997 | For each dictionary added to a variable, the block of codes in | 997 | For each dictionary added to a variable, the block of codes in |
| 998 | the template will be repeated. | 998 | the template will be repeated. |
| 999 | 999 | ||
| 1000 | If optional argument @var{SHOW-ONLY} is non-@code{nil}, then don't add a new dictionarly | 1000 | If optional argument @var{SHOW-ONLY} is non-@code{nil}, then don't add |
| 1001 | if there is already one in place. Also, don't add @var{FIRST}/@var{LAST} entries. | 1001 | a new dictionary if there is already one in place. Also, don't add |
| 1002 | @var{FIRST}/@var{LAST} entries. | ||
| 1002 | These entries are not needed when we are just showing a section. | 1003 | These entries are not needed when we are just showing a section. |
| 1003 | 1004 | ||
| 1004 | Each dictionary added will automatically get values for positional macros | 1005 | Each dictionary added will automatically get values for positional macros |
| @@ -1126,7 +1127,7 @@ want, but adding dictionary values is the right thing. | |||
| 1126 | @node Querying a Dictionary | 1127 | @node Querying a Dictionary |
| 1127 | @section Querying a Dictionary | 1128 | @section Querying a Dictionary |
| 1128 | 1129 | ||
| 1129 | When creating a new argument, it may be useful to ask the dicitonary | 1130 | When creating a new argument, it may be useful to ask the dictionary |
| 1130 | what entries are already set there, and conditionally create new | 1131 | what entries are already set there, and conditionally create new |
| 1131 | entries based on those. | 1132 | entries based on those. |
| 1132 | 1133 | ||
| @@ -1234,7 +1235,7 @@ The current hour in 24 hour format. | |||
| 1234 | @item HOUR12 | 1235 | @item HOUR12 |
| 1235 | The current hour in 12 hour format. | 1236 | The current hour in 12 hour format. |
| 1236 | @item AMPM | 1237 | @item AMPM |
| 1237 | Locale equivalent of AM or PM. Usefule with HOUR12. | 1238 | Locale equivalent of AM or PM@. Useful with HOUR12. |
| 1238 | @item MINUTE | 1239 | @item MINUTE |
| 1239 | The current minute. | 1240 | The current minute. |
| 1240 | @item SECOND | 1241 | @item SECOND |
| @@ -1331,7 +1332,7 @@ entries. | |||
| 1331 | 1332 | ||
| 1332 | @table @code | 1333 | @table @code |
| 1333 | @item ARGS | 1334 | @item ARGS |
| 1334 | A Loop macro value. Each argument is inserted in ARGS. To create a | 1335 | A Loop macro value. Each argument is inserted in ARGS@. To create a |
| 1335 | comma separated list of arguments, you might do this: | 1336 | comma separated list of arguments, you might do this: |
| 1336 | 1337 | ||
| 1337 | @example | 1338 | @example |
| @@ -1412,7 +1413,7 @@ name. | |||
| 1412 | Converts the filename into text that would be suitable as a class-name | 1413 | Converts the filename into text that would be suitable as a class-name |
| 1413 | for the main class in the file. | 1414 | for the main class in the file. |
| 1414 | @item CURRENT_PACKAGE | 1415 | @item CURRENT_PACKAGE |
| 1415 | Finds the occurance of ``package'' and gets its value. | 1416 | Finds the occurrence of ``package'' and gets its value. |
| 1416 | @end table | 1417 | @end table |
| 1417 | 1418 | ||
| 1418 | @subsubsection Argument :el | 1419 | @subsubsection Argument :el |
| @@ -1430,7 +1431,7 @@ to namespaces in other languages. | |||
| 1430 | The name of the Emacs Custom group that instances of @code{defcustom} | 1431 | The name of the Emacs Custom group that instances of @code{defcustom} |
| 1431 | ought to use. | 1432 | ought to use. |
| 1432 | @item FACEGROUP | 1433 | @item FACEGROUP |
| 1433 | The name of the Emacs Custom group that faces delcared with | 1434 | The name of the Emacs Custom group that faces declared with |
| 1434 | @code{defface} ought to use. | 1435 | @code{defface} ought to use. |
| 1435 | @end table | 1436 | @end table |
| 1436 | 1437 | ||
| @@ -1551,7 +1552,7 @@ tables that do not belong to an application will be searched. | |||
| 1551 | @end defun | 1552 | @end defun |
| 1552 | 1553 | ||
| 1553 | For purposes of an @srecode{} application, it is important to decide | 1554 | For purposes of an @srecode{} application, it is important to decide |
| 1554 | what to call yoru application, and use that with this method call. | 1555 | what to call your application, and use that with this method call. |
| 1555 | 1556 | ||
| 1556 | @section Creating dictionaries | 1557 | @section Creating dictionaries |
| 1557 | 1558 | ||
| @@ -1582,7 +1583,7 @@ If @var{stream} is nil, then use the current buffer. | |||
| 1582 | @node Template Naming Conventions | 1583 | @node Template Naming Conventions |
| 1583 | @chapter Template Naming Conventions | 1584 | @chapter Template Naming Conventions |
| 1584 | 1585 | ||
| 1585 | For @srecode{} to work across langauges reliably, templates need to | 1586 | For @srecode{} to work across languages reliably, templates need to |
| 1586 | follow a predictable pattern. For every language of similar nature | 1587 | follow a predictable pattern. For every language of similar nature |
| 1587 | (OO, functional, doc based) if they all provide the same base | 1588 | (OO, functional, doc based) if they all provide the same base |
| 1588 | templates, then an application can be written against the base | 1589 | templates, then an application can be written against the base |
| @@ -1613,7 +1614,7 @@ Functional languages should attempt to support the following: | |||
| 1613 | @item function | 1614 | @item function |
| 1614 | A standalone function. Not a method, external method, or other. | 1615 | A standalone function. Not a method, external method, or other. |
| 1615 | @item method | 1616 | @item method |
| 1616 | A method belonging to some class declaired outside the textual bounds | 1617 | A method belonging to some class declared outside the textual bounds |
| 1617 | of that class' declaration. | 1618 | of that class' declaration. |
| 1618 | @item variable | 1619 | @item variable |
| 1619 | A global variable. | 1620 | A global variable. |
| @@ -1685,7 +1686,7 @@ also the following useful dictionary values. | |||
| 1685 | 1686 | ||
| 1686 | @table @var | 1687 | @table @var |
| 1687 | @item TAG | 1688 | @item TAG |
| 1688 | A special insertion value TAG. You can use semantic functions to turn | 1689 | A special insertion value TAG@. You can use semantic functions to turn |
| 1689 | the tag into a string. | 1690 | the tag into a string. |
| 1690 | @item HAVEDEFAULT | 1691 | @item HAVEDEFAULT |
| 1691 | @itemx DEFAULT | 1692 | @itemx DEFAULT |