aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-24 19:37:13 +0000
committerRichard M. Stallman1997-04-24 19:37:13 +0000
commitf788776c22c1deb2fd78378ada00c86e93d91db1 (patch)
tree9877a45ebbcaf0e6a59e3db86e02c8bac306da7d
parent6d528fc505f6be1e67f87834bdde19cf4bbe05ff (diff)
downloademacs-f788776c22c1deb2fd78378ada00c86e93d91db1.tar.gz
emacs-f788776c22c1deb2fd78378ada00c86e93d91db1.zip
Many doc fixes.
-rw-r--r--lisp/textmodes/sgml-mode.el78
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.
52This list is used when first loading the sgml-mode library. 52This list is used when first loading the sgml-mode library.
53The supported characters and potential disadvantages are: 53The supported characters and potential disadvantages are:
54 54
@@ -64,8 +64,8 @@ Including ?- has the problem of affecting dashes that have nothing to do
64with comments, so we normally turn it off.") 64with 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.
68This takes effect when first loading the library.") 68This 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.
205Any terminating > or / is not matched.") 205Any 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 /.
354Keys <, &, SPC within <>, \" and ' can be electric depending on 354Keys <, &, SPC within <>, \" and ' can be electric depending on
355`sgml-quick-keys'. 355`sgml-quick-keys'.
356 356
357An argument of N to a tag-inserting command means that the next N 357An argument of N to a tag-inserting command means to wrap it around
358words should be wrapped. When the region is highlighted, N defaults 358the next N words. In Transient Mark mode, when the mark is active,
359to -1, which means the current region. 359N defaults to -1, which means to wrap it around the current region.
360 360
361If you like upcased tags, put (setq sgml-transformation 'upcase) in 361If you like upcased tags, put (setq sgml-transformation 'upcase) in
362your .emacs file. 362your `.emacs' file.
363 363
364Use \\[sgml-validate] to validate your document with an SGML parser. 364Use \\[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 `/'.
390Two /s are treated as matching if the first / ends a net-enabling 390Two `/'s are treated as matching if the first `/' ends a net-enabling
391start tag, and the second / is the corresponding null end tag." 391start 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.
479Completion and configuration is done according to `sgml-tag-alist'. 479Completion and configuration are done according to `sgml-tag-alist'.
480If you like tags and attributes in uppercase do \\[set-variable] 480If you like tags and attributes in uppercase do \\[set-variable]
481skeleton-transformation RET upcase RET, or put this in your .emacs 481skeleton-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
507Completion and configuration of TAG is done according to `sgml-tag-alist'. 507Completion and configuration of TAG are done according to `sgml-tag-alist'.
508If QUIET, does not print a message when there are no attributes for TAG." 508If 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.
544With prefix ARG only self insert." 544With 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.
594With prefix ARG, repeat that many times." 594With 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.
610With prefix ARG, repeat that many times. 610With prefix argument ARG, repeat this ARG times.
611Return t iff after a closing tag." 611Return 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.
641With prefix ARG, repeat that many times." 641With 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.
746Runs COMMAND, a shell command, in a separate process asynchronously 746Runs COMMAND, a shell command, in a separate process asynchronously
747with output going to the buffer *compilation*. 747with output going to the buffer `*compilation*'.
748You can then use the command \\[next-error] to find the next error message 748You can then use the command \\[next-error] to find the next error message
749and move to the line in the SGML document that caused it." 749and 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.
767Else `t'." 767If 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." 786See `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.
1155Pages can have <a name=\"SOMENAME\">named points</a> and can link other points 1155Pages can have <a name=\"SOMENAME\">named points</a> and can link other points
1156to them with <a href=\"#SOMENAME\">see also somename</a>. In the same way <a 1156to them with <a href=\"#SOMENAME\">see also somename</a>. In the same way <a
1157href=\"URL\">see also URL</a> where URL is a filename relative to current 1157href=\"URL\">see also URL</a> where URL is a filename relative to current
1158directory or something like http://www.cs.indiana.edu/elisp/w3/docs.html. 1158directory, or absolute as in `http://www.cs.indiana.edu/elisp/w3/docs.html'.
1159 1159
1160Images in many formats can be inlined with <img src=\"URL\">. 1160Images in many formats can be inlined with <img src=\"URL\">.
1161 1161
1162If you mainly create your own documents, `sgml-specials' might be interesting. 1162If you mainly create your own documents, `sgml-specials' might be
1163But note that some HTML 2 browsers can't handle &apos;. To work around that 1163interesting. But note that some HTML 2 browsers can't handle `&apos;'.
1164do: 1164To 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)