diff options
| author | Richard M. Stallman | 1997-04-24 19:37:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-24 19:37:13 +0000 |
| commit | f788776c22c1deb2fd78378ada00c86e93d91db1 (patch) | |
| tree | 9877a45ebbcaf0e6a59e3db86e02c8bac306da7d | |
| parent | 6d528fc505f6be1e67f87834bdde19cf4bbe05ff (diff) | |
| download | emacs-f788776c22c1deb2fd78378ada00c86e93d91db1.tar.gz emacs-f788776c22c1deb2fd78378ada00c86e93d91db1.zip | |
Many doc fixes.
| -rw-r--r-- | lisp/textmodes/sgml-mode.el | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index c3f7c585a96..792d643893e 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | ;; sensitively confirm the syntax of characters, we have to live with this | 48 | ;; sensitively confirm the syntax of characters, we have to live with this |
| 49 | ;; kludgy kind of tradeoff. | 49 | ;; kludgy kind of tradeoff. |
| 50 | (defvar sgml-specials '(?\") | 50 | (defvar sgml-specials '(?\") |
| 51 | "List of characters that have a special meaning for sgml-mode. | 51 | "List of characters that have a special meaning for SGML mode. |
| 52 | This list is used when first loading the sgml-mode library. | 52 | This list is used when first loading the sgml-mode library. |
| 53 | The supported characters and potential disadvantages are: | 53 | The supported characters and potential disadvantages are: |
| 54 | 54 | ||
| @@ -64,8 +64,8 @@ Including ?- has the problem of affecting dashes that have nothing to do | |||
| 64 | with comments, so we normally turn it off.") | 64 | with comments, so we normally turn it off.") |
| 65 | 65 | ||
| 66 | (defvar sgml-quick-keys nil | 66 | (defvar sgml-quick-keys nil |
| 67 | "Use <, >, &, SPC and `sgml-specials' keys ``electrically'' when non-nil. | 67 | "Use <, >, &, SPC and `sgml-specials' keys \"electrically\" when non-nil. |
| 68 | This takes effect when first loading the library.") | 68 | This takes effect when first loading the sgml-mode library.") |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | (defvar sgml-mode-map | 71 | (defvar sgml-mode-map |
| @@ -136,7 +136,7 @@ This takes effect when first loading the library.") | |||
| 136 | 136 | ||
| 137 | 137 | ||
| 138 | (defcustom sgml-name-8bit-mode nil | 138 | (defcustom sgml-name-8bit-mode nil |
| 139 | "*When non-`nil' insert 8 bit characters with their names." | 139 | "*When non-nil, insert 8 bit characters with their names." |
| 140 | :type 'boolean | 140 | :type 'boolean |
| 141 | :group 'sgml) | 141 | :group 'sgml) |
| 142 | 142 | ||
| @@ -195,14 +195,14 @@ separated by a space." | |||
| 195 | ;;; I doubt that null end tags are used much for large elements, | 195 | ;;; I doubt that null end tags are used much for large elements, |
| 196 | ;;; so use a small distance here. | 196 | ;;; so use a small distance here. |
| 197 | (defcustom sgml-slash-distance 1000 | 197 | (defcustom sgml-slash-distance 1000 |
| 198 | "*If non-nil, is the maximum distance to search for matching /." | 198 | "*If non-nil, is the maximum distance to search for matching `/'." |
| 199 | :type '(choice (const nil) integer) | 199 | :type '(choice (const nil) integer) |
| 200 | :group 'sgml) | 200 | :group 'sgml) |
| 201 | 201 | ||
| 202 | (defconst sgml-start-tag-regex | 202 | (defconst sgml-start-tag-regex |
| 203 | "<[A-Za-z]\\([-.A-Za-z0-9= \n\t]\\|\"[^\"]*\"\\|'[^']*'\\)*" | 203 | "<[A-Za-z]\\([-.A-Za-z0-9= \n\t]\\|\"[^\"]*\"\\|'[^']*'\\)*" |
| 204 | "Regular expression that matches a non-empty start tag. | 204 | "Regular expression that matches a non-empty start tag. |
| 205 | Any terminating > or / is not matched.") | 205 | Any terminating `>' or `/' is not matched.") |
| 206 | 206 | ||
| 207 | 207 | ||
| 208 | (defvar sgml-font-lock-keywords | 208 | (defvar sgml-font-lock-keywords |
| @@ -354,12 +354,12 @@ Makes > match <. Makes / blink matching /. | |||
| 354 | Keys <, &, SPC within <>, \" and ' can be electric depending on | 354 | Keys <, &, SPC within <>, \" and ' can be electric depending on |
| 355 | `sgml-quick-keys'. | 355 | `sgml-quick-keys'. |
| 356 | 356 | ||
| 357 | An argument of N to a tag-inserting command means that the next N | 357 | An argument of N to a tag-inserting command means to wrap it around |
| 358 | words should be wrapped. When the region is highlighted, N defaults | 358 | the next N words. In Transient Mark mode, when the mark is active, |
| 359 | to -1, which means the current region. | 359 | N defaults to -1, which means to wrap it around the current region. |
| 360 | 360 | ||
| 361 | If you like upcased tags, put (setq sgml-transformation 'upcase) in | 361 | If you like upcased tags, put (setq sgml-transformation 'upcase) in |
| 362 | your .emacs file. | 362 | your `.emacs' file. |
| 363 | 363 | ||
| 364 | Use \\[sgml-validate] to validate your document with an SGML parser. | 364 | Use \\[sgml-validate] to validate your document with an SGML parser. |
| 365 | 365 | ||
| @@ -386,9 +386,9 @@ Do \\[describe-key] on the following bindings to discover what they do. | |||
| 386 | 386 | ||
| 387 | 387 | ||
| 388 | (defun sgml-slash (arg) | 388 | (defun sgml-slash (arg) |
| 389 | "Insert / and display any previous matching /. | 389 | "Insert `/' and display any previous matching `/'. |
| 390 | Two /s are treated as matching if the first / ends a net-enabling | 390 | Two `/'s are treated as matching if the first `/' ends a net-enabling |
| 391 | start tag, and the second / is the corresponding null end tag." | 391 | start tag, and the second `/' is the corresponding null end tag." |
| 392 | (interactive "p") | 392 | (interactive "p") |
| 393 | (insert-char ?/ arg) | 393 | (insert-char ?/ arg) |
| 394 | (if (> arg 0) | 394 | (if (> arg 0) |
| @@ -469,17 +469,17 @@ or M-- for a soft hyphen." | |||
| 469 | (if sgml-name-8bit-mode "ON" "OFF"))) | 469 | (if sgml-name-8bit-mode "ON" "OFF"))) |
| 470 | 470 | ||
| 471 | 471 | ||
| 472 | ; When an element of a skeleton is a string "str", it is passed | 472 | ;; When an element of a skeleton is a string "str", it is passed |
| 473 | ; through skeleton-transformation and inserted. If "str" is to be | 473 | ;; through skeleton-transformation and inserted. If "str" is to be |
| 474 | ; inserted literally, one should obtain it as the return value of a | 474 | ;; inserted literally, one should obtain it as the return value of a |
| 475 | ; function, e.g. (identity "str"). | 475 | ;; function, e.g. (identity "str"). |
| 476 | 476 | ||
| 477 | (define-skeleton sgml-tag | 477 | (define-skeleton sgml-tag |
| 478 | "Insert a tag you are prompted for, optionally with attributes. | 478 | "Prompt for a tag and insert it, optionally with attributes. |
| 479 | Completion and configuration is done according to `sgml-tag-alist'. | 479 | Completion and configuration are done according to `sgml-tag-alist'. |
| 480 | If you like tags and attributes in uppercase do \\[set-variable] | 480 | If you like tags and attributes in uppercase do \\[set-variable] |
| 481 | skeleton-transformation RET upcase RET, or put this in your .emacs | 481 | skeleton-transformation RET upcase RET, or put this in your `.emacs': |
| 482 | (setq sgml-transformation 'upcase)." | 482 | (setq sgml-transformation 'upcase)" |
| 483 | (funcall skeleton-transformation | 483 | (funcall skeleton-transformation |
| 484 | (completing-read "Tag: " sgml-tag-alist)) | 484 | (completing-read "Tag: " sgml-tag-alist)) |
| 485 | ?< (setq v1 (eval str)) | | 485 | ?< (setq v1 (eval str)) | |
| @@ -502,10 +502,10 @@ skeleton-transformation RET upcase RET, or put this in your .emacs | |||
| 502 | (autoload 'skeleton-read "skeleton") | 502 | (autoload 'skeleton-read "skeleton") |
| 503 | 503 | ||
| 504 | (defun sgml-attributes (tag &optional quiet) | 504 | (defun sgml-attributes (tag &optional quiet) |
| 505 | "When at toplevel of a tag, interactively insert attributes. | 505 | "When at top level of a tag, interactively insert attributes. |
| 506 | 506 | ||
| 507 | Completion and configuration of TAG is done according to `sgml-tag-alist'. | 507 | Completion and configuration of TAG are done according to `sgml-tag-alist'. |
| 508 | If QUIET, does not print a message when there are no attributes for TAG." | 508 | If QUIET, do not print a message when there are no attributes for TAG." |
| 509 | (interactive (list (save-excursion (sgml-beginning-of-tag t)))) | 509 | (interactive (list (save-excursion (sgml-beginning-of-tag t)))) |
| 510 | (or (stringp tag) (error "Wrong context for adding attribute")) | 510 | (or (stringp tag) (error "Wrong context for adding attribute")) |
| 511 | (if tag | 511 | (if tag |
| @@ -540,8 +540,8 @@ If QUIET, does not print a message when there are no attributes for TAG." | |||
| 540 | car))) | 540 | car))) |
| 541 | 541 | ||
| 542 | (defun sgml-auto-attributes (arg) | 542 | (defun sgml-auto-attributes (arg) |
| 543 | "Self insert, except, when at top level of tag, prompt for attributes. | 543 | "Self insert the character typed; at top level of tag, prompt for attributes. |
| 544 | With prefix ARG only self insert." | 544 | With prefix argument, only self insert." |
| 545 | (interactive "*P") | 545 | (interactive "*P") |
| 546 | (let ((point (point)) | 546 | (let ((point (point)) |
| 547 | tag) | 547 | tag) |
| @@ -557,7 +557,7 @@ With prefix ARG only self insert." | |||
| 557 | 557 | ||
| 558 | 558 | ||
| 559 | (defun sgml-tag-help (&optional tag) | 559 | (defun sgml-tag-help (&optional tag) |
| 560 | "Display description of optional TAG or tag at point." | 560 | "Display description of tag TAG. If TAG is omitted, use the tag at point." |
| 561 | (interactive) | 561 | (interactive) |
| 562 | (or tag | 562 | (or tag |
| 563 | (save-excursion | 563 | (save-excursion |
| @@ -591,7 +591,7 @@ With prefix ARG only self insert." | |||
| 591 | 591 | ||
| 592 | (defun sgml-skip-tag-backward (arg) | 592 | (defun sgml-skip-tag-backward (arg) |
| 593 | "Skip to beginning of tag or matching opening tag if present. | 593 | "Skip to beginning of tag or matching opening tag if present. |
| 594 | With prefix ARG, repeat that many times." | 594 | With prefix argument ARG, repeat this ARG times." |
| 595 | (interactive "p") | 595 | (interactive "p") |
| 596 | (while (>= arg 1) | 596 | (while (>= arg 1) |
| 597 | (search-backward "<" nil t) | 597 | (search-backward "<" nil t) |
| @@ -607,7 +607,7 @@ With prefix ARG, repeat that many times." | |||
| 607 | 607 | ||
| 608 | (defun sgml-skip-tag-forward (arg &optional return) | 608 | (defun sgml-skip-tag-forward (arg &optional return) |
| 609 | "Skip to end of tag or matching closing tag if present. | 609 | "Skip to end of tag or matching closing tag if present. |
| 610 | With prefix ARG, repeat that many times. | 610 | With prefix argument ARG, repeat this ARG times. |
| 611 | Return t iff after a closing tag." | 611 | Return t iff after a closing tag." |
| 612 | (interactive "p") | 612 | (interactive "p") |
| 613 | (setq return t) | 613 | (setq return t) |
| @@ -638,7 +638,7 @@ Return t iff after a closing tag." | |||
| 638 | 638 | ||
| 639 | (defun sgml-delete-tag (arg) | 639 | (defun sgml-delete-tag (arg) |
| 640 | "Delete tag on or after cursor, and matching closing or opening tag. | 640 | "Delete tag on or after cursor, and matching closing or opening tag. |
| 641 | With prefix ARG, repeat that many times." | 641 | With prefix argument ARG, repeat this ARG times." |
| 642 | (interactive "p") | 642 | (interactive "p") |
| 643 | (while (>= arg 1) | 643 | (while (>= arg 1) |
| 644 | (save-excursion | 644 | (save-excursion |
| @@ -744,7 +744,7 @@ With prefix ARG, repeat that many times." | |||
| 744 | (defun sgml-validate (command) | 744 | (defun sgml-validate (command) |
| 745 | "Validate an SGML document. | 745 | "Validate an SGML document. |
| 746 | Runs COMMAND, a shell command, in a separate process asynchronously | 746 | Runs COMMAND, a shell command, in a separate process asynchronously |
| 747 | with output going to the buffer *compilation*. | 747 | with output going to the buffer `*compilation*'. |
| 748 | You can then use the command \\[next-error] to find the next error message | 748 | You can then use the command \\[next-error] to find the next error message |
| 749 | and move to the line in the SGML document that caused it." | 749 | and move to the line in the SGML document that caused it." |
| 750 | (interactive | 750 | (interactive |
| @@ -764,7 +764,7 @@ and move to the line in the SGML document that caused it." | |||
| 764 | 764 | ||
| 765 | (defun sgml-beginning-of-tag (&optional top-level) | 765 | (defun sgml-beginning-of-tag (&optional top-level) |
| 766 | "Skip to beginning of tag and return its name. | 766 | "Skip to beginning of tag and return its name. |
| 767 | Else `t'." | 767 | If this can't be done, return t." |
| 768 | (or (if top-level | 768 | (or (if top-level |
| 769 | (condition-case nil | 769 | (condition-case nil |
| 770 | (up-list -1) | 770 | (up-list -1) |
| @@ -782,8 +782,8 @@ Else `t'." | |||
| 782 | t))) | 782 | t))) |
| 783 | 783 | ||
| 784 | (defun sgml-value (alist) | 784 | (defun sgml-value (alist) |
| 785 | "Interactively insert value taken from ALIST, which is an | 785 | "Interactively insert value taken from attributerule ALIST. |
| 786 | `attributerule' as described in sgml-tag-alist." | 786 | See `sgml-tag-alist' for info about attributerules.." |
| 787 | (setq alist (cdr alist)) | 787 | (setq alist (cdr alist)) |
| 788 | (if (stringp (car alist)) | 788 | (if (stringp (car alist)) |
| 789 | (insert "=\"" (car alist) ?\") | 789 | (insert "=\"" (car alist) ?\") |
| @@ -1155,15 +1155,15 @@ Edit/Text Properties/Face commands. | |||
| 1155 | Pages can have <a name=\"SOMENAME\">named points</a> and can link other points | 1155 | Pages can have <a name=\"SOMENAME\">named points</a> and can link other points |
| 1156 | to them with <a href=\"#SOMENAME\">see also somename</a>. In the same way <a | 1156 | to them with <a href=\"#SOMENAME\">see also somename</a>. In the same way <a |
| 1157 | href=\"URL\">see also URL</a> where URL is a filename relative to current | 1157 | href=\"URL\">see also URL</a> where URL is a filename relative to current |
| 1158 | directory or something like http://www.cs.indiana.edu/elisp/w3/docs.html. | 1158 | directory, or absolute as in `http://www.cs.indiana.edu/elisp/w3/docs.html'. |
| 1159 | 1159 | ||
| 1160 | Images in many formats can be inlined with <img src=\"URL\">. | 1160 | Images in many formats can be inlined with <img src=\"URL\">. |
| 1161 | 1161 | ||
| 1162 | If you mainly create your own documents, `sgml-specials' might be interesting. | 1162 | If you mainly create your own documents, `sgml-specials' might be |
| 1163 | But note that some HTML 2 browsers can't handle '. To work around that | 1163 | interesting. But note that some HTML 2 browsers can't handle `''. |
| 1164 | do: | 1164 | To work around that, do: |
| 1165 | (eval-after-load \"sgml-mode\" '(aset sgml-char-names ?' nil)) | ||
| 1165 | 1166 | ||
| 1166 | \(eval-after-load \"sgml-mode\" '(aset sgml-char-names ?' nil)) | ||
| 1167 | \\{html-mode-map}" | 1167 | \\{html-mode-map}" |
| 1168 | (interactive) | 1168 | (interactive) |
| 1169 | (sgml-mode-common html-tag-face-alist html-display-text) | 1169 | (sgml-mode-common html-tag-face-alist html-display-text) |