comparison lisp/nxml/nxml-rap.el @ 96496:e374c747704b

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.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 03 Jul 2008 12:25:23 +0000
parents 8c4c0ca00399
children a9dc0e7c3f2b
comparison
equal deleted inserted replaced
96495:c7a78d44a1d3 96496:e374c747704b
92 (make-variable-buffer-local 'nxml-prolog-end) 92 (make-variable-buffer-local 'nxml-prolog-end)
93 93
94 (defvar nxml-scan-end nil 94 (defvar nxml-scan-end nil
95 "Marker giving position up to which we have scanned. 95 "Marker giving position up to which we have scanned.
96 nxml-scan-end must be >= nxml-prolog-end. Furthermore, nxml-scan-end 96 nxml-scan-end must be >= nxml-prolog-end. Furthermore, nxml-scan-end
97 must not an inside position in the following sense. A position is 97 must not be an inside position in the following sense. A position is
98 inside if the following character is a part of, but not the first 98 inside if the following character is a part of, but not the first
99 character of, a CDATA section, comment or processing instruction. 99 character of, a CDATA section, comment or processing instruction.
100 Furthermore all positions >= nxml-prolog-end and < nxml-scan-end that 100 Furthermore all positions >= nxml-prolog-end and < nxml-scan-end that
101 are inside positions must have a non-nil nxml-inside property whose 101 are inside positions must have a non-nil `nxml-inside' property whose
102 value is a symbol specifying what it is inside. Any characters with a 102 value is a symbol specifying what it is inside. Any characters with a
103 non-nil fontified property must have position < nxml-scan-end and the 103 non-nil `fontified' property must have position < nxml-scan-end and
104 correct face. Dependent regions must also be established for any 104 the correct face. Dependent regions must also be established for any
105 unclosed constructs starting before nxml-scan-end. 105 unclosed constructs starting before nxml-scan-end.
106 There must be no nxml-inside properties after nxml-scan-end.") 106 There must be no `nxml-inside' properties after nxml-scan-end.")
107 (make-variable-buffer-local 'nxml-scan-end) 107 (make-variable-buffer-local 'nxml-scan-end)
108 108
109 (defsubst nxml-get-inside (pos) 109 (defsubst nxml-get-inside (pos)
110 (get-text-property pos 'nxml-inside)) 110 (get-text-property pos 'nxml-inside))
111 111
137 137
138 (defun nxml-scan-after-change (start end) 138 (defun nxml-scan-after-change (start end)
139 "Restore `nxml-scan-end' invariants after a change. 139 "Restore `nxml-scan-end' invariants after a change.
140 The change happened between START and END. 140 The change happened between START and END.
141 Return position after which lexical state is unchanged. 141 Return position after which lexical state is unchanged.
142 END must be > nxml-prolog-end. START must be outside 142 END must be > `nxml-prolog-end'. START must be outside
143 any 'inside' regions and at the beginning of a token." 143 any 'inside' regions and at the beginning of a token."
144 (if (>= start nxml-scan-end) 144 (if (>= start nxml-scan-end)
145 nxml-scan-end 145 nxml-scan-end
146 (let ((inside-remove-start start) 146 (let ((inside-remove-start start)
147 xmltok-errors 147 xmltok-errors
299 (nxml-mark-parse-dependent-regions))) 299 (nxml-mark-parse-dependent-regions)))
300 (set-marker nxml-scan-end (point))) 300 (set-marker nxml-scan-end (point)))
301 xmltok-type)) 301 xmltok-type))
302 302
303 (defun nxml-move-tag-backwards (bound) 303 (defun nxml-move-tag-backwards (bound)
304 "Move point backwards outside any 'inside' regions or tags, up 304 "Move point backwards outside any 'inside' regions or tags.
305 to nxml-prolog-end. Point will either be at bound or a '<' 305 Point will not move past `nxml-prolog-end'.
306 character starting a tag outside any 'inside' regions. Ignores 306 Point will either be at BOUND or a '<' character starting a tag
307 dependent regions. As a precondition, point must be >= bound." 307 outside any 'inside' regions. Ignores dependent regions.
308 As a precondition, point must be >= BOUND."
308 (nxml-move-outside-backwards) 309 (nxml-move-outside-backwards)
309 (when (not (equal (char-after) ?<)) 310 (when (not (equal (char-after) ?<))
310 (if (search-backward "<" bound t) 311 (if (search-backward "<" bound t)
311 (progn 312 (progn
312 (nxml-move-outside-backwards) 313 (nxml-move-outside-backwards)
351 352
352 ;;; Element scanning 353 ;;; Element scanning
353 354
354 (defun nxml-scan-element-forward (from &optional up) 355 (defun nxml-scan-element-forward (from &optional up)
355 "Scan forward from FROM over a single balanced element. 356 "Scan forward from FROM over a single balanced element.
356 Point must between tokens. Return the position of the end of the tag 357 Point must be between tokens. Return the position of the end of
357 that ends the element. `xmltok-start' will contain the position of the 358 the tag that ends the element. `xmltok-start' will contain the
358 start of the tag. If UP is non-nil, then scan past end-tag of element 359 position of the start of the tag. If UP is non-nil, then scan
359 containing point. If no element is found, return nil. If a 360 past end-tag of element containing point. If no element is
360 well-formedness error prevents scanning, signal an nxml-scan-error. 361 found, return nil. If a well-formedness error prevents scanning,
361 Point is not moved." 362 signal an `nxml-scan-error'. Point is not moved."
362 (let ((open-tags (and up t)) 363 (let ((open-tags (and up t))
363 found) 364 found)
364 (save-excursion 365 (save-excursion
365 (goto-char from) 366 (goto-char from)
366 (while (cond ((not (nxml-tokenize-forward)) 367 (while (cond ((not (nxml-tokenize-forward))
402 (t t)))) 403 (t t))))
403 found)) 404 found))
404 405
405 (defun nxml-scan-element-backward (from &optional up bound) 406 (defun nxml-scan-element-backward (from &optional up bound)
406 "Scan backward from FROM over a single balanced element. 407 "Scan backward from FROM over a single balanced element.
407 Point must between tokens. Return the position of the end of the tag 408 Point must be between tokens. Return the position of the end of
408 that starts the element. `xmltok-start' will contain the position of 409 the tag that starts the element. `xmltok-start' will contain the
409 the start of the tag. If UP is non-nil, then scan past start-tag of 410 position of the start of the tag. If UP is non-nil, then scan
410 element containing point. If BOUND is non-nil, then don't scan back 411 past start-tag of element containing point. If BOUND is non-nil,
411 past BOUND. If no element is found, return nil. If a well-formedness 412 then don't scan back past BOUND. If no element is found, return
412 error prevents scanning, signal an nxml-scan-error. Point is not 413 nil. If a well-formedness error prevents scanning, signal an
413 moved." 414 `nxml-scan-error'. Point is not moved."
414 (let ((open-tags (and up t)) 415 (let ((open-tags (and up t))
415 token-end found) 416 token-end found)
416 (save-excursion 417 (save-excursion
417 (goto-char from) 418 (goto-char from)
418 (while (cond ((or (< (point) nxml-prolog-end) 419 (while (cond ((or (< (point) nxml-prolog-end)