summaryrefslogtreecommitdiff
path: root/lisp/nxml/xmltok.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2008-07-03 12:25:23 +0000
committerJuanma Barranquero <lekktu@gmail.com>2008-07-03 12:25:23 +0000
commit10545bd83d3b5c7f6082d56a59449ff1eddae2ff (patch)
treee6a516cfc9c44e80a6874a534f0e9a9908d0ba1f /lisp/nxml/xmltok.el
parent946598bf94b5a0fac989f3108a6ee2bc425611de (diff)
downloademacs-10545bd83d3b5c7f6082d56a59449ff1eddae2ff.tar.gz
Fix typos, and general docstring cleanup.
* nxml/nxml-glyph.el (nxml-glyph-set-hook): * nxml/nxml-uchnm.el (nxml-unicode-blocks) (nxml-unicode-block-char-name-set): * nxml/nxml-util.el (nxml-debug, nxml-make-namespace): * nxml/rng-nxml.el (rng-set-state-after): * nxml/rng-uri.el (rng-file-name-uri): Fix typo in docstring. * nxml/rng-cmpct.el (rng-c-lookup-create, rng-c-parse-primary) (rng-c-parse-annotation-body): * nxml/rng-dt.el (rng-dt-namespace-context-getter): Reflow docstrings. * nxml/nxml-mode.el (nxml, nxml-mode, nxml-after-change1) (nxml-extend-region, nxml-merge-indent-context-type, nxml-complete) (nxml-forward-balanced-item, nxml-dynamic-markup-word) (nxml-define-char-name-set, nxml-toggle-char-ref-extra-display): Fix typos in docstrings. (nxml-attribute-indent): Reflow docstring. (nxml-bind-meta-tab-to-complete-flag, nxml-last-fontify-end) (nxml-default-buffer-file-coding-system): Doc fixes. * nxml/nxml-ns.el (nxml-ns-state, nxml-ns-initial-state) (nxml-ns-set-prefix): Fix typos in docstrings. (nxml-ns-push-state, nxml-ns-pop-state, nxml-ns-set-default): Reflow docstring. (nxml-ns-get-prefix, nxml-ns-get-default): Doc fixes. * nxml/nxml-outln.el (nxml-hide-all-text-content) (nxml-show-direct-text-content, nxml-show-direct-subheadings) (nxml-hide-direct-text-content, nxml-hide-subheadings) (nxml-hide-text-content, nxml-show-subheadings, nxml-hide-other) (nxml-outline-display-rest, nxml-outline-set-overlay) (nxml-section-tag-forward, nxml-section-tag-backward) (nxml-back-to-section-start): Fix typos in docstrings. * nxml/nxml-parse.el (nxml-validate-function, nxml-parse-file): Doc fixes. * nxml/nxml-rap.el (nxml-scan-end, nxml-move-tag-backwards) (nxml-scan-element-forward, nxml-scan-element-backward): Doc fixes. (nxml-scan-after-change): Fix typo in docstring. * nxml/rng-match.el (rng-being-compiled, rng-normalize-choice-list) (rng-name-class-possible-names): Doc fixes. (rng-memo-map-add, rng-intern-group, rng-match-possible-namespace-uris) (rng-match-possible-start-tag-names, rng-match-possible-value-strings): Fix typos in docstrings. (rng-intern-group-shortcut, rng-intern-choice-shortcut): Reflow docstrings. * nxml/rng-util.el (rng-uniquify-eq, rng-uniquify-equal): Doc fixes. (rng-substq, rng-complete-before-point): Fix typos in docstrings. * nxml/rng-xsd.el (rng-xsd-make-date-time-regexp) (rng-xsd-convert-date-time): Reflow docstrings. (rng-xsd-compile): Fix typo in docstring. * nxml/rng-loc.el (rng-current-schema-file-name) (rng-locate-schema-file-using, rng-locate-schema-file-from-type-id): Doc fixes. (rng-set-schema-file): Fix typo in docstring. * nxml/rng-valid.el (rng-error-count, rng-validate-mode) (rng-do-some-validation, rng-process-start-tag, rng-process-text): Fix typos in docstrings. (rng-message-overlay, rng-conditional-up-to-date-start) (rng-conditional-up-to-date-end): Doc fixes. (rng-next-error, rng-previous-error): Reflow docstrings. * nxml/xmltok.el (xmltok-attribute-raw-normalized-value): Doc fix. (xmltok-dtd, xmltok-dependent-regions, xmltok-attribute-refs) (xmltok-valid-char-p, xmltok-standalone, xmltok-forward-prolog) (xmltok-merge-attributes): Fix typos in docstrings. (xmltok-make-attribute, xmltok-forward-special) (xmltok-get-declared-encoding-position): Reflow docstrings. * nxml/xsd-regexp.el (xsdre-char-class-to-range-list): Doc fix. (xsdre-range-list-union, xsdre-check-range-list, xsdre-current-regexp): Fix typos in docstrings.
Diffstat (limited to 'lisp/nxml/xmltok.el')
-rw-r--r--lisp/nxml/xmltok.el81
1 files changed, 41 insertions, 40 deletions
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el
index 1c20d63d9fc..138d8e74a6b 100644
--- a/lisp/nxml/xmltok.el
+++ b/lisp/nxml/xmltok.el
@@ -117,8 +117,8 @@ first member of the alist is t if references to entities not in the
alist are well-formed \(e.g. because there's an external subset that
wasn't parsed).
-Each general entity name is a string. The definition is either nil, a
-symbol, a string, a cons cell. If the definition is nil, then it
+Each general entity name is a string. The definition is either nil,
+a symbol, a string, a cons cell. If the definition is nil, then it
means that it's an internal entity but the result of parsing it is
unknown. If it is a symbol, then the symbol is either `unparsed',
meaning the entity is an unparsed entity, `external', meaning the
@@ -126,9 +126,9 @@ entity is or references an external entity, `element', meaning the
entity includes one or more elements, or `not-well-formed', meaning
the replacement text is not well-formed. If the definition is a
string, then the replacement text of the entity is that string; this
-happens only during the parsing of the prolog. If the definition is a
-cons cell \(ER . AR), then ER specifies the string that results from
-referencing the entity in element content and AR is either nil,
+happens only during the parsing of the prolog. If the definition is
+a cons cell \(ER . AR), then ER specifies the string that results
+from referencing the entity in element content and AR is either nil,
meaning the replacement text included a <, or a string which is the
normalized attribute value.")
@@ -151,9 +151,9 @@ arguments followed by the additional arguments if any: the position of
the start of the changed area in the region, the position of the end
of the changed area in the region, the length of the changed area
before the change, the position of the start of the region, the
-position of the end of the region. FUN must return non-nil if the
-region needs reparsing. FUN will be called in a save-excursion with
-match-data saved.
+position of the end of the region. FUN must return non-nil if the
+region needs reparsing. FUN will be called in a `save-excursion'
+with match-data saved.
`xmltok-forward', `xmltok-forward-special' and `xmltok-forward-prolog'
may add entries to the beginning of this list, but will not clear it.
@@ -200,16 +200,16 @@ indicating the position of the error.")
(defsubst xmltok-attribute-raw-normalized-value (att)
"Return an object representing the normalized value of ATT.
-This can t indicating that the normalized value is the same as the
-buffer substring from the start to the end of the value or nil
+This can be t indicating that the normalized value is the same as
+the buffer substring from the start to the end of the value, or nil
indicating that the value is not well-formed or a string."
(aref att 5))
(defsubst xmltok-attribute-refs (att)
"Return a list of the entity and character references in ATT.
Each member is a vector [TYPE START END] where TYPE is either char-ref
-or entity-ref and START and END are integers giving the start and end
-of the reference. Nested entity references are not included in the list."
+or entity-ref and START and END are integers giving the start and end of
+the reference. Nested entity references are not included in the list."
(aref att 6))
(defun xmltok-attribute-prefix (att)
@@ -267,9 +267,10 @@ of the reference. Nested entity references are not included in the list."
value-begin
value-end
raw-normalized-value)
- "Make an attribute. RAW-NORMALIZED-VALUE is nil if the value is
-not well-formed, t if the normalized value is the string between
-VALUE-BEGIN and VALUE-END, otherwise a STRING giving the value."
+ "Make an attribute.
+RAW-NORMALIZED-VALUE is nil if the value is not well-formed,
+t if the normalized value is the string between VALUE-BEGIN
+and VALUE-END, otherwise a STRING giving the value."
(vector name-begin
name-colon
name-end
@@ -351,8 +352,8 @@ VALUE-BEGIN and VALUE-END, otherwise a STRING giving the value."
"Scan forward past the first special token starting at or after point.
Return nil if there is no special token that starts before BOUND.
CDATA sections, processing instructions and comments (and indeed
-anything starting with < following by ? or !) count
-as special. Return the type of the token."
+anything starting with < following by ? or !) count as special.
+Return the type of the token."
(when (re-search-forward "<[?!]" (1+ bound) t)
(setq xmltok-start (match-beginning 0))
(goto-char (1+ xmltok-start))
@@ -392,7 +393,7 @@ as special. Return the type of the token."
(cons (concat "\\(" ,sym "\\)") (cons ',name nil))
(cons (concat "\\(" (car ,sym) "\\)") (cons ',name (cdr ,sym)))))))
- (defun xmltok-p (&rest r) (xmltok+ "\\(?:"
+ (defun xmltok-p (&rest r) (xmltok+ "\\(?:"
(apply 'xmltok+ r)
"\\)"))
@@ -443,7 +444,7 @@ as special. Return the type of the token."
(list 'match-string-no-properties
(xmltok-get-index group-name ',(cdr r))))
(t (error "Invalid action: %s" action))))))))
-
+
(eval-when-compile
(let* ((or "\\|")
@@ -792,7 +793,7 @@ as special. Return the type of the token."
(+ xmltok-start 2)
(+ xmltok-start 5))))
(setq xmltok-type 'processing-instruction))))
-
+
(defun xmltok-scan-after-comment-open ()
(setq xmltok-type
(cond ((not (search-forward "--" nil t))
@@ -932,7 +933,7 @@ as special. Return the type of the token."
(cons att xmltok-attributes)))
(and needs-normalizing
att)))
-
+
(defun xmltok-normalize-attribute (att)
(let ((end (xmltok-attribute-value-end att))
(well-formed t)
@@ -1083,7 +1084,7 @@ as special. Return the type of the token."
delimiter)))
(defun xmltok-valid-char-p (n)
- "Return non-nil if n is the Unicode code of a valid XML character."
+ "Return non-nil if N is the Unicode code of a valid XML character."
(cond ((< n #x20) (memq n '(#xA #xD #x9)))
((< n #xD800) t)
((< n #xE000) nil)
@@ -1104,7 +1105,7 @@ Return nil if unsupported in Emacs."
(defvar xmltok-had-param-entity-ref nil)
(defvar xmltok-prolog-regions nil)
(defvar xmltok-standalone nil
- "Non-nil if there was an XML declaration specifying standalone=\"yes\",")
+ "Non-nil if there was an XML declaration specifying standalone=\"yes\".")
(defvar xmltok-markup-declaration-doctype-flag nil)
(defconst xmltok-predefined-entity-alist
@@ -1122,7 +1123,7 @@ START and END are integers giving the start and end of the region of
that type. TYPE can be one of xml-declaration,
xml-declaration-attribute-name, xml-declaration-attribute-value,
comment, processing-instruction-left, processing-instruction-right,
-markup-declaration-open. markup-declaration-close,
+markup-declaration-open, markup-declaration-close,
internal-subset-open, internal-subset-close, hash-name, keyword,
literal, encoding-name.
Adds to `xmltok-errors' and `xmltok-dependent-regions' as appropriate."
@@ -1163,8 +1164,8 @@ contains an encoding declaration, then return (START . END)
where START and END are the positions of the start and the end
of the encoding name; if there is no encoding declaration return
the position where and encoding declaration could be inserted.
-If there is XML that is not well-formed that looks like an XML declaration,
-return nil. Otherwise, return t.
+If there is XML that is not well-formed that looks like an XML
+declaration, return nil. Otherwise, return t.
If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(cond ((let ((case-fold-search nil))
(and (looking-at (xmltok-xml-declaration regexp))
@@ -1177,7 +1178,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(+ (point) 5)))))
((not (let ((case-fold-search t))
(looking-at xmltok-bad-xml-decl-regexp))))))
-
+
(defun xmltok-scan-xml-declaration ()
(when (looking-at (xmltok-xml-declaration regexp))
(xmltok-add-prolog-region 'xml-declaration (point) (match-end 0))
@@ -1337,7 +1338,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(when (string= (xmltok-current-token-string) "#FIXED")
(xmltok-require-next-token 'literal))
t))))
-
+
(defun xmltok-parse-nmtoken-group ()
(while (progn
(xmltok-require-next-token 'nmtoken 'prefixed-name 'name)
@@ -1378,7 +1379,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
'close-paren-star
'close-paren-occur)
(eq xmltok-type connector))))))
-
+
(defun xmltok-parse-model-group-member ()
(xmltok-require-token 'name
'prefixed-name
@@ -1387,7 +1388,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(when (eq xmltok-type ?\()
(xmltok-next-prolog-token)
(xmltok-parse-model-group)))
-
+
(defun xmltok-parse-entity-declaration ()
(let (paramp name)
(xmltok-require-next-token 'name ?%)
@@ -1418,7 +1419,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(not (assoc name xmltok-dtd)))
(setq xmltok-dtd
(cons (cons name value) xmltok-dtd))))
-
+
(defun xmltok-parse-entity-value ()
(let ((lim (1- (point)))
(well-formed t)
@@ -1458,7 +1459,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(apply 'concat
(nreverse (cons (buffer-substring-no-properties start lim)
value-parts))))))
-
+
(defun xmltok-parse-notation-declaration ()
(xmltok-require-next-token 'name)
(xmltok-require-next-token "SYSTEM" "PUBLIC")
@@ -1543,9 +1544,9 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(hash-name . hash-name)))))
((and (stringp required) (eq xmltok-type 'name))
'keyword)))
-
+
;; Return new token type.
-
+
(defun xmltok-next-prolog-token ()
(skip-chars-forward " \t\r\n")
(setq xmltok-start (point))
@@ -1573,13 +1574,13 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(unless (looking-at "[ \t\r\n>),|[%]")
(xmltok-add-error "Missing space after name token"))
(setq xmltok-type 'nmtoken))
- ((xmltok-prolog start name)
+ ((xmltok-prolog start name)
(setq xmltok-name-end (point))
(setq xmltok-name-colon nil)
(unless (looking-at "[ \t\r\n>),|[%]")
(xmltok-add-error "Missing space after name"))
(setq xmltok-type 'name))
- ((xmltok-prolog start hash-name)
+ ((xmltok-prolog start hash-name)
(setq xmltok-name-end (point))
(unless (looking-at "[ \t\r\n>)|%]")
(xmltok-add-error "Missing space after name"))
@@ -1748,10 +1749,10 @@ Processing instruction does not start with a name"
(while todo
(xmltok-parse-entity (car todo))
(setq todo (cdr todo)))))
-
+
(defun xmltok-parse-entity (name-def)
(let ((def (cdr name-def))
- ;; in case its value is buffer local
+ ;; in case its value is buffer local
(xmltok-dtd xmltok-dtd)
buf)
(when (stringp def)
@@ -1855,7 +1856,7 @@ Processing instruction does not start with a name"
'not-well-formed))
((eq def 'unparsed) 'not-well-formed)
(t def)))))
-
+
(defun xmltok-append-entity-def (d1 d2)
(cond ((consp d1)
(if (consp d2)
@@ -1878,7 +1879,7 @@ Processing instruction does not start with a name"
xmltok-prolog-regions)))
(defun xmltok-merge-attributes ()
- "Return a list merging `xmltok-attributes' and 'xmltok-namespace-attributes'.
+ "Return a list merging `xmltok-attributes' and `xmltok-namespace-attributes'.
The members of the merged list are in order of occurrence in the
document. The list may share list structure with `xmltok-attributes'
and `xmltok-namespace-attributes'."