%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/nxml/ |
Current File : //usr/local/share/emacs/27.2/lisp/nxml/rng-valid.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\310\311\312\313\314\315\314\316\314\317& \210\320\321\322\323#\210\324\325\326\327\330DD\331\332\333%\210\324\334\326\327\335DD\336\332\333%\210\324\337\326\327\340DD\341\332\342%\210\324\343\326\327\344DD\345\332\342%\207" [require xmltok nxml-enc nxml-util nxml-ns rng-match rng-util rng-loc custom-declare-group relax-ng nil "Validation of XML using RELAX NG." :group text nxml languages custom-declare-face rng-error ((t (:inherit font-lock-warning-face))) "Face for highlighting XML errors." custom-declare-variable rng-state-cache-distance funcall function #[0 "\300\207" [2000] 1] "Distance in characters between each parsing and validation state cache." :type integer rng-validate-chunk-size #[0 "\300\207" [8000] 1] "Number of characters in a RELAX NG validation chunk.\nA validation chunk will be the smallest chunk that is at least this\nsize and ends with a tag. After validating a chunk, validation will\ncontinue only if Emacs is still idle." rng-validate-delay #[0 "\300\207" [1.5] 1] "Time in seconds that Emacs must be idle before starting a full validation.\nA full validation continues until either validation is up to date\nor Emacs is no longer idle." number rng-validate-quick-delay #[0 "\300\207" [0.3] 1] "Time in seconds that Emacs must be idle before starting a quick validation.\nA quick validation validates at most one chunk."] 10) (defvar rng-validate-timer nil) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local rng-validate-timer put permanent-local t] 4) (defvar rng-validate-quick-timer nil) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local rng-validate-quick-timer put permanent-local t] 4) #@103 Number of errors in the current buffer. Always equal to number of overlays with category `rng-error'. (defvar rng-error-count nil (#$ . 2193)) (make-variable-buffer-local 'rng-error-count) #@88 Overlay in this buffer whose `help-echo' property was last printed. It is nil if none. (defvar rng-message-overlay nil (#$ . 2388)) (make-variable-buffer-local 'rng-message-overlay) #@237 Position at which message from overlay should be inhibited. If point is equal to this and the error overlay around point is `rng-message-overlay', then the `help-echo' property of the error overlay should not be printed with `message'. (defvar rng-message-overlay-inhibit-point nil (#$ . 2577)) (make-variable-buffer-local 'rng-message-overlay-inhibit-point) #@64 Non-nil if `rng-message-overlay' is still the current message. (defvar rng-message-overlay-current nil (#$ . 2942)) (make-variable-buffer-local 'rng-message-overlay-current) #@212 Stack of names of open elements represented as a list. Each member of the list is either t or a (PREFIX . LOCAL-NAME) pair. (PREFIX . LOCAL-NAME) is pushed for a start-tag; t is pushed for a mismatched end-tag. (defvar rng-open-elements nil (#$ . 3123)) #@319 Text content of current element that has yet to be processed. Value is a list of segments (VALUE START END) positions in reverse order. VALUE is a string or nil. If VALUE is nil, then the value is the string between START and END. A segment can also be nil indicating an unresolvable entity or character reference. (defvar rng-pending-contents nil (#$ . 3384)) (defvar rng-collecting-text nil) #@59 Last position where validation is known to be up to date. (defvar rng-validate-up-to-date-end nil (#$ . 3787)) (make-variable-buffer-local 'rng-validate-up-to-date-end) #@500 Marker for the start of the conditionally up-to-date region. It is nil if there is no conditionally up-to-date region. The conditionally up-to-date region must be such that for any cached state S with position P in the conditionally up-to-date region, if at some point it is determined that S becomes correct for P, then all states with position >= P in the conditionally up to date region must also then be correct and all errors between P and the end of the region must then be correctly marked. (defvar rng-conditional-up-to-date-start nil (#$ . 3963)) (make-variable-buffer-local 'rng-conditional-up-to-date-start) #@171 Marker for the end of the conditionally up-to-date region. It is nil if there is no conditionally up-to-date region. See the variable `rng-conditional-up-to-date-start'. (defvar rng-conditional-up-to-date-end nil (#$ . 4590)) (make-variable-buffer-local 'rng-conditional-up-to-date-end) #@96 Non-nil means we are currently parsing just to compute the state. Should be dynamically bound. (defvar rng-parsing-for-state nil (#$ . 4883)) (defvar rng-dtd nil) (make-variable-buffer-local 'rng-dtd) #@103 Non-nil if Rng-Validate mode is enabled. Use the command `rng-validate-mode' to change this variable. (defvar rng-validate-mode nil (#$ . 5091)) (make-variable-buffer-local 'rng-validate-mode) #@1473 Minor mode performing continual validation against a RELAX NG schema. If called interactively, enable Rng-Validate mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'; disable the mode otherwise. Checks whether the buffer is a well-formed XML 1.0 document, conforming to the XML Namespaces Recommendation and valid against a RELAX NG schema. The mode-line indicates whether it is or not. Any parts of the buffer that cause it not to be are considered errors and are highlighted with face `rng-error'. A description of each error is available as a tooltip. \[rng-next-error] goes to the next error after point. Clicking mouse-1 on the word `Invalid' in the mode-line goes to the first error in the buffer. If the buffer changes, then it will be automatically rechecked when Emacs becomes idle; the rechecking will be paused whenever there is input pending. By default, uses a vacuous schema that allows any well-formed XML document. A schema can be specified explicitly using \[rng-set-schema-file-and-validate], or implicitly based on the buffer's file name or on the root element name. In each case the schema must be a RELAX NG schema using the compact schema (such schemas conventionally have a suffix of `.rnc'). The variable `rng-schema-locating-files' specifies files containing rules to use for finding the schema. (fn &optional ARG) (defalias 'rng-validate-mode #[256 "\306 \307=\203 ?\202 \310!\311V\214~\210\312 \313\211\313\314\311\315\316\317!\320\"\321$\216\322ed\"\210,\210\323edT\"\210e)\324 \210\311\325\326\327\313#\210\203a \330\216\212.\203Y ./=\203] \331\313!\210*\202| \332 \210\325\333\332\313#\210\325\334\335\313#\210\325\336\337\313#\210\325\340\341\313#\210\342\343\203\206 \344\202\207 \345\"\210\346\347!\203\253 \306 \203\233 \211\306 \232\203\253 \350\351\352\203\246 \353\202\247 \354#\266\210\355 \210\207" [rng-validate-mode buffer-undo-list inhibit-read-only inhibit-modification-hooks rng-validate-up-to-date-end rng-error-count current-message toggle prefix-numeric-value 0 buffer-modified-p t make-byte-code "\300?\205 \301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 rng-clear-cached-state rng-clear-overlays rng-clear-conditional-region remove-hook rng-schema-change-hook rng-validate-clear #[0 "\204 \301\302!\210\303\304\305\302\306$\210\303\307\310\302\306$\210\303\311\312\302\306$\210\303\313\314\302\306$\210\303\315\316\302\306$\210\317 \210\320 \210\321p\322\"\205; \323p!\207" [rng-current-schema rng-set-schema-file-1 nil add-hook rng-schema-change-hook rng-validate-clear t after-change-functions rng-after-change-function kill-buffer-hook rng-kill-timers echo-area-clear-hook rng-echo-area-clear-function post-command-hook rng-maybe-echo-error-at-point rng-match-init-buffer rng-activate-timers get-buffer-window visible rng-validate-while-idle] 5] rng-auto-set-schema rng-cancel-timers kill-buffer-hook post-command-hook rng-maybe-echo-error-at-point echo-area-clear-hook rng-echo-area-clear-function after-change-functions rng-after-change-function run-hooks rng-validate-mode-hook rng-validate-mode-on-hook rng-validate-mode-off-hook called-interactively-p any " in current buffer" message "Rng-Validate mode %sabled%s" "en" "dis" force-mode-line-update rng-current-schema rng-any-element] 10 (#$ . 5292) (byte-code "\206 \301C\207" [current-prefix-arg toggle] 1)]) (defvar rng-validate-mode-hook nil) (byte-code "\301\302N\204\f \303\301\302\304#\210\305\306\307\310\300!\205 \307\211%\207" [rng-validate-mode-map rng-validate-mode-hook variable-documentation put "Hook run after entering or leaving `rng-validate-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode rng-validate-mode nil boundp] 6) #@125 Sets the schema and turns on `rng-validate-mode' if not already on. The schema is set like `rng-set-schema'. (fn FILENAME) (defalias 'rng-set-schema-file-and-validate #[257 "\301!\210\206\n \300 \207" [rng-validate-mode rng-set-schema-file] 3 (#$ . 9225) "fSchema file: "]) #@16 (fn TYPE-ID) (defalias 'rng-set-document-type-and-validate #[257 "\301!\205\f \206\f \300 \207" [rng-validate-mode rng-set-document-type] 3 (#$ . 9508) (byte-code "\300 C\207" [rng-read-type-id] 1)]) #@125 Set the schema for this buffer automatically and turn on `rng-validate-mode'. The schema is set like `rng-auto-set-schema'. (defalias 'rng-auto-set-schema-and-validate #[0 "\301 \210\206 \300 \207" [rng-validate-mode rng-auto-set-schema] 1 (#$ . 9719) nil]) #@33 (fn START END PRE-CHANGE-LEN) (defalias 'rng-after-change-function #[771 "\306\307 \310\211\310\311\312\313\314\315!\316\"\317$\216\320\"\210,\210\fW\2037 \\\fX\2035 \f\321#\\\2026 \203V W\203g W\203P \306\223\210\202g \322 \210\202g \fW\203g \323\f\306\"\323\310\"\fW\203o \fdY\203\211 edW\203\200 dS\202\210 \214~\210edS])\324 \210\325 \207" [rng-message-overlay-inhibit-point buffer-undo-list inhibit-read-only inhibit-modification-hooks rng-validate-up-to-date-end rng-conditional-up-to-date-start nil buffer-modified-p t make-byte-code 0 "\300?\205 \301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 rng-clear-cached-state - rng-clear-conditional-region copy-marker rng-activate-timers force-mode-line-update rng-conditional-up-to-date-end] 11 (#$ . 9985)]) (defalias 'rng-compute-mode-line-string #[0 "\203 \303\304\305 \306U\203 \306\202 \307 eZdeZ\"\"\207\n\306V\203. \310\311\312\313\314\315\316\317\320\"%P\207\321\207" [rng-validate-timer rng-validate-up-to-date-end rng-error-count format " Validated:%d%%" buffer-size 0 floor " " propertize "Invalid" help-echo "mouse-1: go to first error" local-map make-mode-line-mouse-map mouse-1 rng-mouse-first-error " Valid"] 9]) (defalias 'rng-cancel-timers #[0 "\303 \203\f \304 !\210\305\n\205 \304\n!\210\305\211)\207" [inhibit-quit rng-validate-timer rng-validate-quick-timer t cancel-timer nil] 2]) (defalias 'rng-kill-timers #[0 "\302\300!\203 \203 \303!\210\304\300!\210\302\301!\205# \203 \303 !\210\304\301!\207" [rng-validate-timer rng-validate-quick-timer local-variable-p cancel-timer kill-local-variable] 2]) (defalias 'rng-activate-timers #[0 "?\205 \305\306\n\305\307p$\306\305\310p$\211)\207" [rng-validate-timer inhibit-quit rng-validate-delay rng-validate-quick-delay rng-validate-quick-timer t run-with-idle-timer rng-validate-while-idle rng-validate-quick-while-idle] 5]) (defalias 'rng-validate-clear #[0 " =\203 \302!\303 )\207\303 \207" [rng-current-schema rng-any-element copy-sequence rng-validate-mode] 2]) (defvar rng-validate-display-point nil) (defvar rng-validate-display-modified-p nil) (defalias 'rng-validate-while-idle-continue-p #[0 "\303 ?\205 ` b\210\n\204 \304\305!\210\306 \210\307\310!b\210\211\262)\207" [rng-validate-up-to-date-end rng-validate-display-point rng-validate-display-modified-p input-pending-p restore-buffer-modified-p nil force-mode-line-update sit-for 0] 2]) #@15 (fn BUFFER) (defalias 'rng-validate-while-idle #[257 "\303!\205' r\211q\210\203$ `\304 \305\306!*\203 \307 \202&