Mercurial > emacs
comparison lisp/nxml/rng-loc.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 |
---|---|
31 (require 'rng-util) | 31 (require 'rng-util) |
32 (require 'xmltok) | 32 (require 'xmltok) |
33 | 33 |
34 (defvar rng-current-schema-file-name nil | 34 (defvar rng-current-schema-file-name nil |
35 "Filename of schema being used for current buffer. | 35 "Filename of schema being used for current buffer. |
36 Nil if using a vacuous schema.") | 36 It is nil if using a vacuous schema.") |
37 (make-variable-buffer-local 'rng-current-schema-file-name) | 37 (make-variable-buffer-local 'rng-current-schema-file-name) |
38 | 38 |
39 (defvar rng-schema-locating-files-default | 39 (defvar rng-schema-locating-files-default |
40 (list "schemas.xml" (expand-file-name "schema/schemas.xml" data-directory)) | 40 (list "schemas.xml" (expand-file-name "schema/schemas.xml" data-directory)) |
41 "Default value for variable `rng-schema-locating-files'.") | 41 "Default value for variable `rng-schema-locating-files'.") |
89 (defun rng-set-schema-file (filename) | 89 (defun rng-set-schema-file (filename) |
90 "Set the schema for the current buffer to the schema in FILENAME. | 90 "Set the schema for the current buffer to the schema in FILENAME. |
91 FILENAME must be the name of a file containing a schema. | 91 FILENAME must be the name of a file containing a schema. |
92 The extension of FILENAME is used to determine what kind of schema it | 92 The extension of FILENAME is used to determine what kind of schema it |
93 is. The variable `rng-schema-loader-alist' maps from schema | 93 is. The variable `rng-schema-loader-alist' maps from schema |
94 extensions to schema loader functions. The function | 94 extensions to schema loader functions. The function |
95 `rng-c-load-schema' is the loader for RELAX NG compact syntax. The | 95 `rng-c-load-schema' is the loader for RELAX NG compact syntax. The |
96 association is between the buffer and the schema: the association is | 96 association is between the buffer and the schema: the association is |
97 lost when the buffer is killed." | 97 lost when the buffer is killed." |
98 (interactive "fSchema file: ") | 98 (interactive "fSchema file: ") |
99 (condition-case err | 99 (condition-case err |
115 (if filename | 115 (if filename |
116 (rng-load-schema filename) | 116 (rng-load-schema filename) |
117 rng-any-element)) | 117 rng-any-element)) |
118 (setq rng-current-schema-file-name filename) | 118 (setq rng-current-schema-file-name filename) |
119 (run-hooks 'rng-schema-change-hook)) | 119 (run-hooks 'rng-schema-change-hook)) |
120 | 120 |
121 (defun rng-load-schema (filename) | 121 (defun rng-load-schema (filename) |
122 (let* ((extension (file-name-extension filename)) | 122 (let* ((extension (file-name-extension filename)) |
123 (loader (cdr (assoc extension rng-schema-loader-alist)))) | 123 (loader (cdr (assoc extension rng-schema-loader-alist)))) |
124 (or loader | 124 (or loader |
125 (if extension | 125 (if extension |
130 | 130 |
131 (defun rng-what-schema () | 131 (defun rng-what-schema () |
132 "Display a message saying what schema `rng-validate-mode' is using." | 132 "Display a message saying what schema `rng-validate-mode' is using." |
133 (interactive) | 133 (interactive) |
134 (if rng-current-schema-file-name | 134 (if rng-current-schema-file-name |
135 (message "Using schema %s" | 135 (message "Using schema %s" |
136 (abbreviate-file-name rng-current-schema-file-name)) | 136 (abbreviate-file-name rng-current-schema-file-name)) |
137 (message "Using vacuous schema"))) | 137 (message "Using vacuous schema"))) |
138 | 138 |
139 (defun rng-auto-set-schema (&optional no-display-error) | 139 (defun rng-auto-set-schema (&optional no-display-error) |
140 "Set the schema for this buffer based on the buffer's contents and file-name." | 140 "Set the schema for this buffer based on the buffer's contents and file-name." |
186 (rng-uniquify-equal (sort type-ids 'string<)))) | 186 (rng-uniquify-equal (sort type-ids 'string<)))) |
187 | 187 |
188 (defun rng-locate-schema-file-using (files) | 188 (defun rng-locate-schema-file-using (files) |
189 "Locate a schema using the schema locating files FILES. | 189 "Locate a schema using the schema locating files FILES. |
190 FILES is a list of file-names. | 190 FILES is a list of file-names. |
191 Return either a URI, a list (TYPE-ID) where TYPE-ID is a string | 191 Return either a URI, a list (TYPE-ID) where TYPE-ID is a string, |
192 or nil." | 192 or nil." |
193 (let (rules | 193 (let (rules |
194 ;; List of types that override normal order-based | 194 ;; List of types that override normal order-based |
195 ;; priority, most important first | 195 ;; priority, most important first |
196 preferred-types | 196 preferred-types |
379 type-ids))))))) | 379 type-ids))))))) |
380 type-ids)) | 380 type-ids)) |
381 | 381 |
382 (defun rng-locate-schema-file-from-type-id (type-id file) | 382 (defun rng-locate-schema-file-from-type-id (type-id file) |
383 "Locate the schema for type id TYPE-ID using schema locating file FILE. | 383 "Locate the schema for type id TYPE-ID using schema locating file FILE. |
384 Return either a URI, a list (TYPE-ID) where TYPE-ID is a string | 384 Return either a URI, a list (TYPE-ID) where TYPE-ID is a string, |
385 or nil." | 385 or nil." |
386 (let ((rules (rng-get-parsed-schema-locating-file file)) | 386 (let ((rules (rng-get-parsed-schema-locating-file file)) |
387 schema rule) | 387 schema rule) |
388 (while (and rules (not schema)) | 388 (while (and rules (not schema)) |
389 (setq rule (car rules)) | 389 (setq rule (car rules)) |
423 (setcdr cached (list mtime parsed)) | 423 (setcdr cached (list mtime parsed)) |
424 (setq rng-schema-locating-file-alist | 424 (setq rng-schema-locating-file-alist |
425 (cons (list file mtime parsed) | 425 (cons (list file mtime parsed) |
426 rng-schema-locating-file-alist))) | 426 rng-schema-locating-file-alist))) |
427 parsed)))) | 427 parsed)))) |
428 | 428 |
429 (defconst rng-locate-namespace-uri | 429 (defconst rng-locate-namespace-uri |
430 (nxml-make-namespace "http://thaiopensource.com/ns/locating-rules/1.0")) | 430 (nxml-make-namespace "http://thaiopensource.com/ns/locating-rules/1.0")) |
431 | 431 |
432 (defun rng-parse-schema-locating-file (file) | 432 (defun rng-parse-schema-locating-file (file) |
433 "Return list of rules. | 433 "Return list of rules. |