Mercurial > emacs
comparison lisp/nxml/rng-cmpct.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 | d495d4d5452f |
children | a9dc0e7c3f2b |
comparison
equal
deleted
inserted
replaced
96495:c7a78d44a1d3 | 96496:e374c747704b |
---|---|
243 | 243 |
244 (defconst rng-c-about-override-slot 0) | 244 (defconst rng-c-about-override-slot 0) |
245 (defconst rng-c-about-combine-slot 1) | 245 (defconst rng-c-about-combine-slot 1) |
246 | 246 |
247 (defun rng-c-lookup-create (name grammar) | 247 (defun rng-c-lookup-create (name grammar) |
248 "Return a def object for NAME. A def object is a pair | 248 "Return a def object for NAME. |
249 \(ABOUT . REF) where REF is returned by `rng-make-ref'. ABOUT is a | 249 A def object is a pair \(ABOUT . REF) where REF is returned by |
250 two-element vector [OVERRIDE COMBINE]. COMBINE is either nil, choice | 250 `rng-make-ref'. |
251 or interleave. OVERRIDE is either nil, require or t." | 251 ABOUT is a two-element vector [OVERRIDE COMBINE]. |
252 COMBINE is either nil, choice or interleave. | |
253 OVERRIDE is either nil, require or t." | |
252 (let ((def (gethash name grammar))) | 254 (let ((def (gethash name grammar))) |
253 (if def | 255 (if def |
254 def | 256 def |
255 (progn | 257 (progn |
256 (setq def (cons (vector nil nil) (rng-make-ref name))) | 258 (setq def (cons (vector nil nil) (rng-make-ref name))) |
257 (puthash name def grammar) | 259 (puthash name def grammar) |
258 def)))) | 260 def)))) |
259 | 261 |
260 (defun rng-c-make-ref (name) | 262 (defun rng-c-make-ref (name) |
468 (rng-c-expect "=") | 470 (rng-c-expect "=") |
469 (setq rng-c-datatype-decls | 471 (setq rng-c-datatype-decls |
470 (cons (cons prefix | 472 (cons (cons prefix |
471 (rng-make-datatypes-uri (rng-c-parse-literal))) | 473 (rng-make-datatypes-uri (rng-c-parse-literal))) |
472 rng-c-datatype-decls)))) | 474 rng-c-datatype-decls)))) |
473 | 475 |
474 (defun rng-c-parse-namespace () | 476 (defun rng-c-parse-namespace () |
475 (rng-c-declare-namespace nil | 477 (rng-c-declare-namespace nil |
476 (rng-c-parse-identifier-or-keyword))) | 478 (rng-c-parse-identifier-or-keyword))) |
477 | 479 |
478 (defun rng-c-parse-default () | 480 (defun rng-c-parse-default () |
479 (rng-c-expect "namespace") | 481 (rng-c-expect "namespace") |
480 (rng-c-declare-namespace t | 482 (rng-c-declare-namespace t |
481 (if (string-equal rng-c-current-token "=") | 483 (if (string-equal rng-c-current-token "=") |
482 nil | 484 nil |
483 (rng-c-parse-identifier-or-keyword)))) | 485 (rng-c-parse-identifier-or-keyword)))) |
484 | 486 |
485 (defun rng-c-declare-namespace (declare-default prefix) | 487 (defun rng-c-declare-namespace (declare-default prefix) |
613 (rng-c-advance) | 615 (rng-c-advance) |
614 (funcall (cdr op) p)))) | 616 (funcall (cdr op) p)))) |
615 p))) | 617 p))) |
616 | 618 |
617 (defun rng-c-parse-primary () | 619 (defun rng-c-parse-primary () |
618 "Parse a primary expression. The current token must be the first | 620 "Parse a primary expression. |
619 token of the expression. After parsing the current token should be | 621 The current token must be the first token of the expression. |
620 token following the primary expression." | 622 After parsing the current token should be the token following |
623 the primary expression." | |
621 (cond ((rng-c-current-token-keyword-p) | 624 (cond ((rng-c-current-token-keyword-p) |
622 (let ((parse-function (get (intern rng-c-current-token) | 625 (let ((parse-function (get (intern rng-c-current-token) |
623 'rng-c-pattern))) | 626 'rng-c-pattern))) |
624 (or parse-function | 627 (or parse-function |
625 (rng-c-error "Keyword %s does not introduce a pattern" | 628 (rng-c-error "Keyword %s does not introduce a pattern" |
689 (cond ((rng-c-current-token-ncname-p) | 692 (cond ((rng-c-current-token-ncname-p) |
690 (rng-c-advance-with rng-c-current-token)) | 693 (rng-c-advance-with rng-c-current-token)) |
691 ((rng-c-current-token-quoted-identifier-p) | 694 ((rng-c-current-token-quoted-identifier-p) |
692 (rng-c-advance-with (substring rng-c-current-token 1))) | 695 (rng-c-advance-with (substring rng-c-current-token 1))) |
693 (t (rng-c-error "Expected identifier or keyword")))) | 696 (t (rng-c-error "Expected identifier or keyword")))) |
694 | 697 |
695 (put 'string 'rng-c-pattern 'rng-c-parse-string) | 698 (put 'string 'rng-c-pattern 'rng-c-parse-string) |
696 (put 'token 'rng-c-pattern 'rng-c-parse-token) | 699 (put 'token 'rng-c-pattern 'rng-c-parse-token) |
697 (put 'element 'rng-c-pattern 'rng-c-parse-element) | 700 (put 'element 'rng-c-pattern 'rng-c-parse-element) |
698 (put 'attribute 'rng-c-pattern 'rng-c-parse-attribute) | 701 (put 'attribute 'rng-c-pattern 'rng-c-parse-attribute) |
699 (put 'list 'rng-c-pattern 'rng-c-parse-list) | 702 (put 'list 'rng-c-pattern 'rng-c-parse-list) |
738 (setcdr tail newcdr) | 741 (setcdr tail newcdr) |
739 (setq tail newcdr)) | 742 (setq tail newcdr)) |
740 (string-equal rng-c-current-token "|"))) | 743 (string-equal rng-c-current-token "|"))) |
741 (rng-make-choice-name-class name-classes)) | 744 (rng-make-choice-name-class name-classes)) |
742 name-class))) | 745 name-class))) |
743 | 746 |
744 (defun rng-c-parse-primary-name-class (attribute) | 747 (defun rng-c-parse-primary-name-class (attribute) |
745 (cond ((rng-c-current-token-ncname-p) | 748 (cond ((rng-c-current-token-ncname-p) |
746 (rng-c-advance-with | 749 (rng-c-advance-with |
747 (rng-make-name-name-class | 750 (rng-make-name-name-class |
748 (rng-make-name (rng-c-unqualified-namespace attribute) | 751 (rng-make-name (rng-c-unqualified-namespace attribute) |
899 | 902 |
900 ;; XXX need stricter checking of attribute names | 903 ;; XXX need stricter checking of attribute names |
901 ;; XXX don't allow attributes after text | 904 ;; XXX don't allow attributes after text |
902 | 905 |
903 (defun rng-c-parse-annotation-body (&optional allow-text) | 906 (defun rng-c-parse-annotation-body (&optional allow-text) |
904 "Current token is [. Parse up to matching ]. Current token after | 907 "Current token is [. Parse up to matching ]. |
905 parse is token following ]." | 908 Current token after parse is token following ]." |
906 (or (string-equal rng-c-current-token "[") | 909 (or (string-equal rng-c-current-token "[") |
907 (rng-c-error "Expected [")) | 910 (rng-c-error "Expected [")) |
908 (rng-c-advance) | 911 (rng-c-advance) |
909 (while (not (string-equal rng-c-current-token "]")) | 912 (while (not (string-equal rng-c-current-token "]")) |
910 (cond ((rng-c-current-token-literal-p) | 913 (cond ((rng-c-current-token-literal-p) |
920 ((string-equal rng-c-current-token "=") | 923 ((string-equal rng-c-current-token "=") |
921 (rng-c-advance) | 924 (rng-c-advance) |
922 (rng-c-parse-literal)) | 925 (rng-c-parse-literal)) |
923 (t (rng-c-error "Expected = or [")))))) | 926 (t (rng-c-error "Expected = or [")))))) |
924 (rng-c-advance)) | 927 (rng-c-advance)) |
925 | 928 |
926 (defun rng-c-advance-with (pattern) | 929 (defun rng-c-advance-with (pattern) |
927 (rng-c-advance) | 930 (rng-c-advance) |
928 pattern) | 931 pattern) |
929 | 932 |
930 (defun rng-c-expect (str) | 933 (defun rng-c-expect (str) |