diff lisp/nxml/rng-match.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
line wrap: on
line diff
--- a/lisp/nxml/rng-match.el	Wed Jul 02 16:23:35 2008 +0000
+++ b/lisp/nxml/rng-match.el	Thu Jul 03 12:25:23 2008 +0000
@@ -43,7 +43,7 @@
 
 (defvar rng-being-compiled nil
   "Contains a list of ref patterns currently being compiled.
-Used to detect illegal recursive references.")
+Used to detect invalid recursive references.")
 
 (defvar rng-ipattern-table nil)
 
@@ -67,7 +67,7 @@
   (defun rng-ipattern-slot-accessor-name (slot-name)
     (intern (concat "rng-ipattern-get-"
 		    (symbol-name slot-name))))
-  
+
   (defun rng-ipattern-slot-setter-name (slot-name)
     (intern (concat "rng-ipattern-set-"
 		    (symbol-name slot-name)))))
@@ -112,13 +112,13 @@
   "Associate KEY with VALUE in memo-map MM and return the new memo-map.
 The new memo-map may or may not be a different object from MM.
 
-Alists are better for small maps. Hash tables are better for large
+Alists are better for small maps.  Hash tables are better for large
 maps.  A memo-map therefore starts off as an alist and switches to a
-hash table for large memo-maps. A memo-map is always a list.  An empty
-memo-map is represented by nil. A large memo-map is represented by a
+hash table for large memo-maps.  A memo-map is always a list.  An empty
+memo-map is represented by nil.  A large memo-map is represented by a
 list containing just a hash-table.  A small memo map is represented by
 a list whose cdr is an alist and whose car is the number of entries in
-the alist. The complete memo-map can be passed to assoc without
+the alist.  The complete memo-map can be passed to `assoc' without
 problems: assoc ignores any members that are not cons cells.  There is
 therefore minimal overhead in successful lookups on small lists
 \(which is the most common case)."
@@ -141,7 +141,7 @@
 	    (t (cons (1+ head)
 		     (cons (cons key value)
 			   (cdr mm))))))))
-	     
+
 (defsubst rng-make-ipattern (type index name-class child nullable)
   (vector type index name-class child nullable
 	  ;; 5 memo-text-typed
@@ -216,7 +216,7 @@
 			    after
 			    child
 			    nil)))))
-  
+
 (defun rng-intern-attribute (name-class ipattern)
   (if (eq ipattern rng-not-allowed-ipattern)
       rng-not-allowed-ipattern
@@ -293,7 +293,7 @@
 			    nil)))))
 
 (defun rng-intern-group (ipatterns)
-  "Return a ipattern for the list of group members in IPATTERNS."
+  "Return an ipattern for the list of group members in IPATTERNS."
   (or (rng-intern-group-shortcut ipatterns)
       (let* ((tem (rng-normalize-group-list ipatterns))
 	     (normalized (cdr tem)))
@@ -308,8 +308,8 @@
 				    (car tem))))))))
 
 (defun rng-intern-group-shortcut (ipatterns)
-  "Try to shortcut interning a group list.  If successful, return the
-interned pattern.  Otherwise return nil."
+  "Try to shortcut interning a group list.
+If successful, return the interned pattern.  Otherwise return nil."
   (while (and ipatterns
 	      (eq (car ipatterns) rng-empty-ipattern))
     (setq ipatterns (cdr ipatterns)))
@@ -430,10 +430,10 @@
 			  nil
 			  normalized
 			  nullable))))
-					    
+
 (defun rng-intern-choice-shortcut (ipatterns)
-  "Try to shortcut interning a choice list.  If successful, return the
-interned pattern.  Otherwise return nil."
+  "Try to shortcut interning a choice list.
+If successful, return the interned pattern.  Otherwise return nil."
   (while (and ipatterns
 	      (eq (car ipatterns)
 		  rng-not-allowed-ipattern))
@@ -450,10 +450,10 @@
     rng-not-allowed-ipattern))
 
 (defun rng-normalize-choice-list (ipatterns)
-  "Normalize a list of choices, expanding nested choices, removing
-not-allowed members, sorting by index and removing duplicates.  Return
-a pair whose car says whether the list is nullable and whose cdr is
-the normalized list."
+  "Normalize a list of choices.
+Expands nested choices, removes not-allowed members, sorts by index
+and removes duplicates.  Return a pair whose car says whether the
+list is nullable and whose cdr is the normalized list."
   (let ((sorted t)
 	(nullable nil)
 	(head (cons nil ipatterns)))
@@ -537,9 +537,9 @@
 
 Each possible name should be returned as a (NAMESPACE . LOCAL-NAME)
 pair, where NAMESPACE is a symbol or nil and LOCAL-NAME is a string.
-nil for NAMESPACE matches the absent namespace.  ACCUM is a list of
-names which should be appended to the returned list. The returned list
-may contain duplicates."
+NAMESPACE, if nil, matches the absent namespace.  ACCUM is a list of
+names which should be appended to the returned list.  The returned
+list may contain duplicates."
   (if (consp nc)
       (cons nc accum)
     (when (eq (aref nc 0) 'choice)
@@ -682,7 +682,7 @@
       (rng-compile pattern)
     (setq rng-being-compiled
 	  (cdr rng-being-compiled))))
-	   
+
 (defun rng-compile-one-or-more (pattern)
   (rng-intern-one-or-more (rng-compile pattern)))
 
@@ -734,7 +734,7 @@
       (rng-compile-error "Value %s is not a valid instance of the datatype %s"
 			 str
 			 name))))
-      
+
 (defun rng-compile-name-class (nc)
   (let ((type (car nc)))
     (cond ((eq type 'name) (nth 1 nc))
@@ -871,16 +871,16 @@
 	  ((eq type 'after)
 	   (rng-ipattern-text-typed-p (rng-ipattern-get-child ipattern)))
 	  (t (and (memq type '(value list data data-except)) t)))))
-						   
+
 (defun rng-start-tag-open-deriv (ipattern nm)
   (or (rng-memo-map-get
        nm
        (rng-ipattern-get-memo-map-start-tag-open-deriv ipattern))
       (rng-ipattern-memo-start-tag-open-deriv
        ipattern
-       nm 
+       nm
        (rng-compute-start-tag-open-deriv ipattern nm))))
-							     
+
 (defun rng-ipattern-memo-start-tag-open-deriv (ipattern nm deriv)
   (or (memq ipattern rng-const-ipatterns)
       (rng-ipattern-set-memo-map-start-tag-open-deriv
@@ -907,7 +907,7 @@
 	  ((eq type 'group)
 	   (rng-transform-group-nullable
 	    `(lambda (p) (rng-start-tag-open-deriv p ',nm))
-	    'rng-cons-group-after 
+	    'rng-cons-group-after
 	    ipattern))
 	  ((eq type 'interleave)
 	   (rng-transform-interleave-single
@@ -935,9 +935,9 @@
        (rng-ipattern-get-memo-map-start-attribute-deriv ipattern))
       (rng-ipattern-memo-start-attribute-deriv
        ipattern
-       nm 
+       nm
        (rng-compute-start-attribute-deriv ipattern nm))))
-							     
+
 (defun rng-ipattern-memo-start-attribute-deriv (ipattern nm deriv)
   (or (memq ipattern rng-const-ipatterns)
       (rng-ipattern-set-memo-map-start-attribute-deriv
@@ -964,7 +964,7 @@
 	  ((eq type 'group)
 	   (rng-transform-interleave-single
 	    `(lambda (p) (rng-start-attribute-deriv p ',nm))
-	    'rng-subst-group-after 
+	    'rng-subst-group-after
 	    ipattern))
 	  ((eq type 'interleave)
 	   (rng-transform-interleave-single
@@ -1045,7 +1045,7 @@
 		     'rng-ignore-attributes-deriv
 		     ipattern)
 	  ipattern)))))
-  
+
 (defun rng-text-only-deriv (ipattern)
   (or (rng-ipattern-get-memo-text-only-deriv ipattern)
       (rng-ipattern-set-memo-text-only-deriv
@@ -1305,7 +1305,7 @@
     (setq list1 (cdr list1))
     (setq list2 (cdr list2)))
   (and (null list1) (null list2)))
-    
+
 
 (defun rng-ipattern-after (ipattern)
   (let ((type (rng-ipattern-get-type ipattern)))
@@ -1556,7 +1556,7 @@
 
 (defsubst rng-set-match-state (state)
   (setq rng-match-state state))
-      
+
 (defsubst rng-match-state-equal (state)
   (eq state rng-match-state))
 
@@ -1618,7 +1618,7 @@
 
 (defun rng-match-possible-namespace-uris ()
   "Return a list of all the namespace URIs used in the current schema.
-The absent URI is not included, so the result is always list of symbols."
+The absent URI is not included, so the result is always a list of symbols."
   (rng-map-element-attribute (lambda (pattern accum)
 			       (rng-find-name-class-uris (nth 1 pattern)
 							 accum))
@@ -1681,7 +1681,7 @@
 
 Each possible name is returned as a (NAMESPACE . LOCAL-NAME) pair,
 where NAMESPACE is a symbol or nil (meaning the absent namespace) and
-LOCAL-NAME is a string. The returned list may contain duplicates."
+LOCAL-NAME is a string.  The returned list may contain duplicates."
   (rng-ipattern-possible-start-tags rng-match-state nil))
 
 ;; This is no longer used.  It might be useful so leave it in for now.
@@ -1698,7 +1698,7 @@
 
 (defun rng-match-possible-value-strings ()
   "Return a list of strings that would be valid as content.
-The list may contain duplicates. Typically, the list will not
+The list may contain duplicates.  Typically, the list will not
 be exhaustive."
   (rng-ipattern-possible-values rng-match-state nil))
 
@@ -1735,6 +1735,6 @@
 (def-edebug-spec rng-match-with-schema t)
 
 (provide 'rng-match)
-    
+
 ;; arch-tag: c8c50733-edcf-49fb-85e2-0aac8749b7f8
 ;;; rng-match.el ends here