%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/nxml/ |
Current File : //usr/local/share/emacs/27.2/lisp/nxml/nxml-mode.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307!\210\300\310!\210\300\311!\210\312\313\314\315\316\317\320\321&\210\312\322\314\323\320\313%\210\324\325\326\327\330DD\331\320\313\332\333&\210\324\334\326\327\335DD\336\337\340\320\313\332\333& \210\324\341\326\327\342DD\343\320\313\332\333&\210\324\344\326\327\345DD\346\320\313\332\347&\210\324\350\326\327\351DD\352\320\313\332\347&\210\324\353\326\327\354DD\355\320\313\332\333&\210\324\356\326\327\357DD\360\320\313\332\333&\210\324\361\326\327\362DD\363\320\313\332\333&\210\324\364\326\327\365DD\366\320\313\332\367&\210\324\370\326\327\371DD\372\320\313\332\333&\210\373\374\375\376\320\322%\210\373\377\201@ \201A \320\322%\210\373\201B \201C \201D \320\322%\210\373\201E \314\201F \320\322%\210\373\201G \314\201H \320\322%\210\373\201I \201J \201K \320\322%\210\373\201L \201M \201N \320\322%\210\373\201O \201P \201Q \320\322%\210\373\201R \201S \201T \320\322%\210\373\201U \201V \201W \320\322%\210\373\201X \201Y \201Z \320\322%\210\373\201[ \201\\ \201] \320\322%\210\373\201^ \201_ \201` \320\322%\210\373\201a \201b \201c \320\322%\210\373\201d \201e \201f \320\322%\210\373\201g \201h \201i \320\322%\210\373\201j \201k \201l \320\322%\210\373\201m \201n \201o \320\322%\210\373\201p \314\201q \320\322%\210\373\201r \201s \201t \320\322%\210\373\201u \201v \201w \320\322%\210\373\201x \201y \201z \320\322%\210\373\201{ \201| \201} \320\322%\210\373\201~ \201 \201\200 \320\322%\210\373\201\201 \201\202 \201\203 \320\322%\210\373\201\204 \201\205 \201\206 \320\322%\210\373\201\207 \201\210 \201\211 \320\322%\210\373\201\212 \201\213 \201\214 \320\322%\210\373\201\215 \201\216 \201\217 \320\322%\210\373\201\220 \201\221 \201\222 \320\322%\210\373\201\223 \201\224 \201\225 \320\322%\210\373\201\226 \201\227 \201\230 \320\322%\210\373\201\231 \201\232 \201\233 \320\322%\210\373\201\234 \201\235 \201\236 \320\322%\207" [require xmltok nxml-enc nxml-util nxml-rap nxml-outln provide nxml-mode rng-nxml sgml-mode custom-declare-group nxml nil "New XML editing mode." :link (custom-manual "(nxml-mode) Top") :group languages nxml-faces "Faces for XML syntax highlighting." custom-declare-variable nxml-char-ref-display-glyph-flag funcall function #[0 "\300\207" [t] 1] "Non-nil means display glyph following character reference.\nThe glyph is displayed in face `nxml-glyph'." :type boolean nxml-sexp-element-flag #[0 "\300\207" [t] 1] "Non-nil means sexp commands treat an element as a single expression." :version "27.1" nxml-slash-auto-complete-flag #[0 "\300\207" [nil] 1] "Non-nil means typing a slash automatically completes the end-tag.\nThis is used by `nxml-electric-slash'." nxml-child-indent #[0 "\300\207" [2] 1] "Indentation for the children of an element relative to the start-tag.\nThis only applies when the line or lines containing the start-tag contains\nnothing else other than that start-tag." integer nxml-attribute-indent #[0 "\300\207" [4] 1] "Indentation for the attributes of an element relative to the start-tag.\nThis only applies when the first attribute of a tag starts a line.\nIn other cases, the first attribute on one line is indented the same\nas the first attribute on the previous line." nxml-bind-meta-tab-to-complete-flag #[0 "\300\207" [t] 1] "Non-nil means to use nXML completion in \\[completion-at-point]." nxml-prefer-utf-16-to-utf-8-flag #[0 "\300\207" [nil] 1] "Non-nil means prefer UTF-16 to UTF-8 when saving a buffer.\nThis is used only when a buffer does not contain an encoding declaration\nand when its current `buffer-file-coding-system' specifies neither UTF-16\nnor UTF-8." nxml-prefer-utf-16-little-to-big-endian-flag #[0 "\301=\207" [system-type windows-nt] 2] "Non-nil means prefer little-endian to big-endian byte-order for UTF-16.\nThis is used only for saving a buffer; when reading the byte-order is\nauto-detected. It may be relevant both when there is no encoding declaration\nand when the encoding declaration specifies `UTF-16'." nxml-default-buffer-file-coding-system #[0 "\300\207" [nil] 1] "Default value for `buffer-file-coding-system' for a buffer for a new file.\nA value of nil means use the default value of `buffer-file-coding-system' as normal.\nA buffer's `buffer-file-coding-system' affects what \\[nxml-insert-xml-declaration] inserts." coding-system nxml-auto-insert-xml-declaration-flag #[0 "\300\207" [nil] 1] "Non-nil means automatically insert an XML declaration in a new file.\nThe XML declaration is inserted using `nxml-insert-xml-declaration'." custom-declare-face nxml-delimited-data ((t (:inherit font-lock-doc-face))) "Face used to highlight data enclosed between delimiters.\nThis is not used directly, but only via inheritance by other faces." nxml-name ((t (:inherit font-lock-builtin-face))) "Face used to highlight various names.\nThis includes element and attribute names, processing\ninstruction targets and the CDATA keyword in a CDATA section.\nThis is not used directly, but only via inheritance by other faces." nxml-ref ((t (:inherit font-lock-constant-face))) "Face used to highlight character and entity references.\nThis is not used directly, but only via inheritance by other faces." nxml-delimiter "Face used to highlight delimiters.\nThis is not used directly, but only via inheritance by other faces." nxml-text "Face used to highlight text." nxml-processing-instruction-delimiter ((t (:inherit nxml-delimiter))) "Face used for the delimiters of processing instructions, i.e., <? and ?>." nxml-processing-instruction-target ((t (:inherit font-lock-keyword-face))) "Face used for the target of processing instructions." nxml-processing-instruction-content ((t (:inherit nxml-delimited-data))) "Face used for the content of processing instructions." nxml-cdata-section-delimiter ((t (:inherit nxml-delimiter))) "Face used for the delimiters of CDATA sections, i.e., <![, [, and ]]>." nxml-cdata-section-CDATA ((t (:inherit nxml-name))) "Face used for the CDATA keyword in CDATA sections." nxml-cdata-section-content ((t (:inherit nxml-text))) "Face used for the content of CDATA sections." nxml-char-ref-number ((t (:inherit nxml-ref))) "Face used for the number in character references.\nThis includes ths `x' in hex references." nxml-char-ref-delimiter ((t (:inherit nxml-ref))) "Face used for the delimiters of character references, i.e., &# and ;." nxml-entity-ref-name ((t (:inherit nxml-ref))) "Face used for the entity name in general entity references." nxml-entity-ref-delimiter ((t (:inherit nxml-ref))) "Face used for the delimiters of entity references, i.e., & and ;." nxml-tag-delimiter ((t (:inherit nxml-delimiter))) "Face used for the angle brackets delimiting tags.\n`nxml-tag-slash' is used for slashes." nxml-tag-slash ((t (:inherit nxml-tag-delimiter))) "Face used for slashes in tags, both in end-tags and empty-elements." nxml-element-prefix ((t (:inherit nxml-name))) "Face used for the prefix of elements." nxml-element-colon "Face used for the colon in element names." nxml-element-local-name ((t (:inherit font-lock-function-name-face))) "Face used for the local name of elements." nxml-attribute-prefix ((t (:inherit nxml-name))) "Face used for the prefix of attributes." nxml-attribute-colon ((t (:inherit nxml-delimiter))) "Face used for the colon in attribute names." nxml-attribute-local-name ((t (:inherit font-lock-variable-name-face))) "Face used for the local name of attributes." nxml-namespace-attribute-xmlns ((t (:inherit nxml-attribute-prefix))) "Face used for `xmlns' in namespace attributes." nxml-namespace-attribute-colon ((t (:inherit nxml-attribute-colon))) "Face used for the colon in namespace attributes." nxml-namespace-attribute-prefix ((t (:inherit nxml-attribute-local-name))) "Face used for the prefix declared in namespace attributes." nxml-attribute-value ((t (:inherit font-lock-string-face))) "Face used for the value of attributes." nxml-attribute-value-delimiter ((t (:inherit nxml-attribute-value))) "Face used for the delimiters of attribute values." nxml-prolog-literal-delimiter ((t (:inherit nxml-delimited-data))) "Face used for the delimiters of literals in the prolog." nxml-prolog-literal-content ((t (:inherit nxml-delimited-data))) "Face used for the content of literals in the prolog." nxml-prolog-keyword ((t (:inherit font-lock-keyword-face))) "Face used for keywords in the prolog." nxml-markup-declaration-delimiter ((t (:inherit nxml-delimiter))) "Face used for the delimiters of markup declarations in the prolog.\nThe delimiters are <! and >." nxml-hash ((t (:inherit nxml-name))) "Face used for # before a name in the prolog." nxml-glyph ((((type x)) (:family "misc-fixed" :background "light grey" :foreground "black" :weight normal :slant normal)) (t (:background "light grey" :foreground "black" :weight normal :slant normal))) "Face used for glyph for char references."] 10) #@97 The parent document for a part of a modular document. Use `nxml-parent-document-set' to set it. (defvar nxml-parent-document nil (#$ . 9295)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local nxml-parent-document put safe-local-variable stringp] 4) #@111 List of regions in the prolog to be fontified. See the function `xmltok-forward-prolog' for more information. (defvar nxml-prolog-regions nil (#$ . 9577)) (make-variable-buffer-local 'nxml-prolog-regions) #@161 Non-nil if currently operating in degraded mode. Degraded mode is enabled when an internal error is encountered in the fontification or after-change functions. (defvar nxml-degraded nil (#$ . 9789)) (make-variable-buffer-local 'nxml-degraded) #@62 Hook run by `nxml-complete'. This hook is run until success. (defvar nxml-completion-hook nil (#$ . 10038)) #@226 Hook to determine whether point is in mixed content. The hook is called without arguments. It should return nil if it is definitely not mixed; non-nil otherwise. The hook will be run until one of the functions returns nil. (defvar nxml-in-mixed-content-hook nil (#$ . 10153)) #@70 Maximum distance from point to scan when checking for mixed content. (defvar nxml-mixed-scan-distance 4000 (#$ . 10437)) #@71 Maximum distance from point to scan backwards when indenting end-tag. (defvar nxml-end-tag-indent-scan-distance 4000 (#$ . 10564)) #@275 Non-nil means display extra information for character references. The extra information consists of a tooltip with the character name and, if `nxml-char-ref-display-glyph-flag' is non-nil, a glyph corresponding to the referenced character following the character reference. (defvar nxml-char-ref-extra-display t (#$ . 10702)) (make-variable-buffer-local 'nxml-char-ref-extra-display) #@23 Keymap for nxml-mode. (defvar nxml-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\322#\210\302\324\322#\210\302\325\326#\210\302\327\330#\210\302\331\332#\210\302\333\334#\210\302\335\336#\210\302\337\340#\210\302\341#\210\302\342\343#\210\302\344\345#\210\302\346\347#\210\211\207" [nxml-outline-prefix-map make-sparse-keymap define-key "\225" nxml-backward-up-element "\204" nxml-down-element "\216" nxml-forward-element "\220" nxml-backward-element "\373" nxml-backward-paragraph "\375" nxml-forward-paragraph "\350" nxml-mark-paragraph "" nxml-finish-element "]" "/" " " nxml-split-element "" nxml-balanced-close-start-tag-block " " nxml-balanced-close-start-tag-inline "" nxml-insert-xml-declaration "" nxml-dynamic-markup-word "" nxml-insert-named-char "" [S-mouse-2] nxml-mouse-hide-direct-text-content "/" nxml-electric-slash "\211" completion-at-point] 5) (#$ . 11092)) #@43 Default font lock keywords for nxml-mode. (defvar nxml-font-lock-keywords '(nxml-fontify-matcher) (#$ . 12138)) #@23 (fn START END FACE) (defalias 'nxml-set-face #[771 "\211\205 W\205 \300\301$\207" [font-lock-prepend-text-property face] 8 (#$ . 12256)]) (put 'nxml-set-face 'byte-optimizer 'byte-compile-inline-expand) #@74 Set `nxml-parent-document' and inherit the DTD &c. (fn PARENT-DOCUMENT) (defalias 'nxml-parent-document-set #[257 "\306\211\211\211\211\211\307!\307!\230\203 \310\311!\210r\312!q\210 \262\n\262\262\f\262 \262\262\262)\211\313\314\"\210\205R \315p!\207" [buffer-file-name rng-dtd rng-current-schema rng-current-schema-file-name rng-compile-table rng-ipattern-table nil file-truename error "Parent document cannot be the same as the document" find-file-noselect message "Set parent document to %s" rng-validate-while-idle rng-last-ipattern-index nxml-parent-document rng-validate-mode] 10 (#$ . 12474) "fParent document"]) #@53 Syntactic keywords for `nxml-mode'. (fn START END) (defalias 'nxml-syntax-propertize #[514 "W\203 \301 \210\302\"\207" [nxml-prolog-end nxml-scan-prolog sgml-syntax-propertize] 5 (#$ . 13139)]) (defvar nxml-mode-hook nil) (byte-code "\300\301N\204\f \302\300\301\303#\210\304\305!\204 \302\305\306\307#\210\300\207" [nxml-mode-hook variable-documentation put "Hook run after entering nXML mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp nxml-mode-map definition-name nxml-mode] 4) (defvar nxml-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204 \303\301\302\304\305!#\210\306\307!\204 \303\307\310\311#\210\312\313 !\210\307\302N\204- \303\307\302\304\314!#\210\306\300!\204B \303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P \303\300\302\304\320!#\210\303\311\321\322#\207" [nxml-mode-abbrev-table nxml-mode-map variable-documentation put purecopy "Keymap for `nxml-mode'." boundp nxml-mode-syntax-table definition-name nxml-mode (lambda (#1=#:def-tmp-var) (defvar nxml-mode-syntax-table #1#)) make-syntax-table "Syntax table for `nxml-mode'." (lambda (#1#) (defvar nxml-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `nxml-mode'." derived-mode-parent text-mode] 5) #@2653 Major mode for editing XML. \[nxml-finish-element] finishes the current element by inserting an end-tag. C-c C-i closes a start-tag with `>' and then inserts a balancing end-tag leaving point between the start-tag and end-tag. \[nxml-balanced-close-start-tag-block] is similar but for block rather than inline elements: the start-tag, point, and end-tag are all left on separate lines. If `nxml-slash-auto-complete-flag' is non-nil, then inserting a `</' automatically inserts the rest of the end-tag. \[completion-at-point] performs completion on the symbol preceding point. \[nxml-dynamic-markup-word] uses the contents of the current buffer to choose a tag to put around the word preceding point. Sections of the document can be displayed in outline form. The variable `nxml-section-element-name-regexp' controls when an element is recognized as a section. The same key sequences that change visibility in outline mode are used except that they start with C-c C-o instead of C-c. Validation is provided by the related minor-mode `rng-validate-mode'. This also makes completion schema- and context- sensitive. Element names, attribute names, attribute values and namespace URIs can all be completed. By default, `rng-validate-mode' is automatically enabled. You can toggle it using \[rng-validate-mode] or change the default by customizing `rng-nxml-auto-validate-flag'. \[indent-for-tab-command] indents the current line appropriately. This can be customized using the variable `nxml-child-indent' and the variable `nxml-attribute-indent'. \[nxml-insert-named-char] inserts a character reference using the character's name (by default, the Unicode name). \[universal-argument] \[nxml-insert-named-char] inserts the character directly. The Emacs commands that normally operate on balanced expressions will operate on XML markup items. Thus \[forward-sexp] will move forward across one markup item; \[backward-sexp] will move backward across one markup item; \[kill-sexp] will kill the following markup item; \[mark-sexp] will mark the following markup item. By default, the complete element is treated as a single markup item; to make each tag be treated as a separate markup item, set the variable `nxml-sexp-element-flag' to nil. For more details, see the function `nxml-forward-balanced-item'. \[nxml-backward-up-element] and \[nxml-down-element] move up and down the element structure. Many aspects this mode can be customized using \[customize-group] nxml RET. In addition to any hooks its parent mode `text-mode' might have run, this mode runs the hook `nxml-mode-hook', as the final or penultimate step during initialization. (defalias 'nxml-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204' \316\317 \"\210\320\f!\211\2035 \211\321 =\203; \322\f\323 \"\210\210\324 \325\"\204R @=\204R \326 \325@C#\210\327!\210\330\f!\210 @\306\331!\210\332\333\334A\"A\"\334\232\203s \334\202t \335\306\336!\210\337\340\341\"\306\342!\210\343\"\306\344!\210\345$\306\346!\210\347&\306\350!\210\351(\306\352!\210\353*\306\354!\210\351,\306\355!\210\356-\306\357!\210\360/\306\361!\210\3621\306\363!\210\3643\306\365!\210\3665\306\367!\210\3707\212\214~\210\371 \307\211BC\307D\372\373\374\375\376!\377\"\201L $\216\307E\201M \210-\210*\306\201G !\210FG\306\201H !\210\201N H\201O \201P \201Q \345\307$\210\201R \2030\201S \201R !\204VI\203C\201T \201A !\204CIAJ\203V\201U \373U\203V\201V \210\201W K\201X 1i\201Y 0\202s\201Z \201[ \"\262\210)\201\\ \201] !\207" [delay-mode-hooks major-mode mode-name nxml-mode-map nxml-mode-syntax-table nxml-mode-abbrev-table make-local-variable t text-mode nxml-mode "nXML" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table tildify-space-string decode-coding-string encode-coding-string " " " " tildify-foreach-region-function apply-partially tildify-foreach-ignore-environments (("<! *--" . "-- *>") ("<" . ">")) mode-line-process ((nxml-degraded "/degraded")) adaptive-fill-mode nil forward-sexp-function nxml-forward-balanced-item indent-line-function nxml-indent-line fill-paragraph-function nxml-do-fill-paragraph comment-indent-function comment-start "<!--" comment-start-skip "<!--[ \n]*" comment-end "-->" comment-end-skip "[ \n]*-->" comment-line-break-function nxml-newline-and-indent comment-quote-nested-function nxml-comment-quote-nested buffer-modified-p make-byte-code 0 "\300?\205 \301\302!\207" vconcat vector [restore-buffer-modified-p nil] local-abbrev-table buffer-file-coding-system buffer-undo-list inhibit-read-only inhibit-modification-hooks inhibit-point-motion-hooks sgml-tag-syntax-table syntax-ppss-table syntax-propertize-function nxml-default-buffer-file-coding-system nxml-auto-insert-xml-declaration-flag font-lock-defaults 2 nxml-scan-prolog nxml-syntax-propertize add-hook change-major-mode-hook nxml-cleanup buffer-file-name file-exists-p local-variable-p buffer-size nxml-insert-xml-declaration (nxml-font-lock-keywords nil nil nil (font-lock-extend-region-functions nxml-extend-region) (jit-lock-contextually . t) (font-lock-unfontify-region-function . nxml-unfontify-region) (font-lock-syntactic-face-function . sgml-font-lock-syntactic-face)) (debug error) rng-nxml-mode-init message "Error: %S" run-mode-hooks nxml-mode-hook] 8 (#$ . 14455) nil]) #@27 Clean up after nxml-mode. (defalias 'nxml-cleanup #[0 "\304\305!\210\212~\210\306 \307\211\307\310\311\312\313\314!\315\"\316$\216\307\317ed\320#\210-\210)\321\322\323\307#\207" [buffer-undo-list inhibit-read-only inhibit-modification-hooks inhibit-point-motion-hooks rng-validate-mode -1 buffer-modified-p t make-byte-code 0 "\300?\205 \301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 remove-text-properties (face nil) remove-hook change-major-mode-hook nxml-cleanup] 8 (#$ . 19972)]) #@20 (fn CONTEXT ERR) (defalias 'nxml-degrade #[514 "\302\303\304!#\210\305 \210\306\307\211\207" [nxml-degraded nxml-prolog-end message "Internal nXML mode error in %s (%s), degrading" error-message-string ding t 1] 7 (#$ . 20485)]) #@18 (fn START END) (defalias 'nxml-debug-region #[514 "\302 \210 b\210\303!*\207" [font-lock-end font-lock-beg nxml-extend-region set-mark] 4 (#$ . 20726) "r"]) #@155 Insert an XML declaration at the beginning of buffer. The XML declaration will declare an encoding depending on the buffer's `buffer-file-coding-system'. (defalias 'nxml-insert-xml-declaration #[0 "\203 \301!\203 \302\303\"\203 \202 \304 eb\210\305\306\307!\"c\207" [buffer-file-coding-system coding-system-p coding-system-get mime-charset nxml-choose-utf-coding-system format "<?xml version=\"1.0\" encoding=\"%s\"?>\n" nxml-coding-system-name] 5 (#$ . 20897) "*"]) (defalias 'nxml-prepare-to-save #[0 "\204 \302\301!\203 \203 \303 !\304=\204! \305=\204! \212\306 )\307\207" [enable-multibyte-characters buffer-file-coding-system local-variable-p coding-system-type 5 no-conversion nxml-select-coding-system nil] 2]) (defalias 'nxml-select-coding-system #[0 "\302ed\"eb\210\303 \211:\205 \304@A\"\211\203* \211\227\305\230\203$ \306 \2020 \307!\2020 \2050 \310 \211\204} ?\205<