Edit file File name : mhtml-mode.elc Content :;ELC ;;; Compiled ;;; in Emacs version 26.1 ;;; 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\307\310\311\312\313DD\314\315\316\317\320\321\322\323\324&\207" [require flyspell sgml-mode js css-mode prog-mode font-lock custom-declare-variable mhtml-tag-relative-indent funcall function #[0 "\300\207" [t] 1] "How <script> and <style> bodies are indented relative to the tag.\n\nWhen t, indentation looks like:\n\n <script>\n code();\n </script>\n\nWhen nil, indentation of the script body starts just below the\ntag, like:\n\n <script>\n code();\n </script>\n\nWhen `ignore', the script body starts in the first column, like:\n\n <script>\ncode();\n </script>" :group sgml :type (choice (const nil) (const t) (const ignore)) :safe symbolp :version "26.1"] 12) #@73 compiler-macro for inlining `mhtml--submode-p'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-p (and (memq (type-of cl-x) cl-struct-mhtml--submode-tags) t)) nil] 9 (#$ . 1175)]) (put 'mhtml--submode-p 'compiler-macro 'mhtml--submode-p--cmacro) #@13 (fn CL-X) (defalias 'mhtml--submode-p #[257 "\301!>\205 \302\207" [cl-struct-mhtml--submode-tags type-of t] 3 (#$ . 1533)]) (byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put mhtml--submode-p side-effect-free error-free put mhtml--submode cl-deftype-satisfies] 5) #@76 compiler-macro for inlining `mhtml--submode-name'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-name--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-name (or (mhtml--submode-p cl-x) (signal 'wrong-type-argument (list 'mhtml--submode cl-x))) (aref cl-x 1)) nil] 9 (#$ . 1823)]) (put 'mhtml--submode-name 'compiler-macro 'mhtml--submode-name--cmacro) #@64 Access slot "name" of `mhtml--submode' struct CL-X. (fn CL-X) (defalias 'mhtml--submode-name #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 1] 5 (#$ . 2237)]) (byte-code "\300\301\302\303#\300\207" [function-put mhtml--submode-name side-effect-free t] 4) #@79 compiler-macro for inlining `mhtml--submode-end-tag'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-end-tag--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-end-tag (or (mhtml--submode-p cl-x) (signal 'wrong-type-argument (list 'mhtml--submode cl-x))) (aref cl-x 2)) nil] 9 (#$ . 2589)]) (put 'mhtml--submode-end-tag 'compiler-macro 'mhtml--submode-end-tag--cmacro) #@67 Access slot "end-tag" of `mhtml--submode' struct CL-X. (fn CL-X) (defalias 'mhtml--submode-end-tag #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 2] 5 (#$ . 3018)]) (byte-code "\300\301\302\303#\300\207" [function-put mhtml--submode-end-tag side-effect-free t] 4) #@84 compiler-macro for inlining `mhtml--submode-syntax-table'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-syntax-table--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-syntax-table (or (mhtml--submode-p cl-x) (signal 'wrong-type-argument (list 'mhtml--submode cl-x))) (aref cl-x 3)) nil] 9 (#$ . 3379)]) (put 'mhtml--submode-syntax-table 'compiler-macro 'mhtml--submode-syntax-table--cmacro) #@72 Access slot "syntax-table" of `mhtml--submode' struct CL-X. (fn CL-X) (defalias 'mhtml--submode-syntax-table #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 3] 5 (#$ . 3833)]) (byte-code "\300\301\302\303#\300\207" [function-put mhtml--submode-syntax-table side-effect-free t] 4) #@82 compiler-macro for inlining `mhtml--submode-propertize'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-propertize--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-propertize (or (mhtml--submode-p cl-x) (signal 'wrong-type-argument (list 'mhtml--submode cl-x))) (aref cl-x 4)) nil] 9 (#$ . 4209)]) (put 'mhtml--submode-propertize 'compiler-macro 'mhtml--submode-propertize--cmacro) #@70 Access slot "propertize" of `mhtml--submode' struct CL-X. (fn CL-X) (defalias 'mhtml--submode-propertize #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 4] 5 (#$ . 4653)]) (byte-code "\300\301\302\303#\300\207" [function-put mhtml--submode-propertize side-effect-free t] 4) #@78 compiler-macro for inlining `mhtml--submode-keymap'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-keymap--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-keymap (or (mhtml--submode-p cl-x) (signal 'wrong-type-argument (list 'mhtml--submode cl-x))) (aref cl-x 5)) nil] 9 (#$ . 5023)]) (put 'mhtml--submode-keymap 'compiler-macro 'mhtml--submode-keymap--cmacro) #@66 Access slot "keymap" of `mhtml--submode' struct CL-X. (fn CL-X) (defalias 'mhtml--submode-keymap #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 5] 5 (#$ . 5447)]) (byte-code "\300\301\302\303#\300\207" [function-put mhtml--submode-keymap side-effect-free t] 4) #@95 compiler-macro for inlining `mhtml--submode-crucial-captured-locals'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-crucial-captured-locals--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-crucial-captured-locals (or (mhtml--submode-p cl-x) (signal 'wrong-type-argument (list 'mhtml--submode cl-x))) (aref cl-x 6)) nil] 9 (#$ . 5805)]) (put 'mhtml--submode-crucial-captured-locals 'compiler-macro 'mhtml--submode-crucial-captured-locals--cmacro) #@83 Access slot "crucial-captured-locals" of `mhtml--submode' struct CL-X. (fn CL-X) (defalias 'mhtml--submode-crucial-captured-locals #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 6] 5 (#$ . 6314)]) (byte-code "\300\301\302\303#\300\207" [function-put mhtml--submode-crucial-captured-locals side-effect-free t] 4) #@87 compiler-macro for inlining `mhtml--submode-captured-locals'. (fn CL-WHOLE-ARG CL-X) (defalias 'mhtml--submode-captured-locals--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block mhtml--submode-captured-locals (or (mhtml--submode-p cl-x) (signal 'wrong-type-argument (list 'mhtml--submode cl-x))) (aref cl-x 7)) nil] 9 (#$ . 6723)]) (put 'mhtml--submode-captured-locals 'compiler-macro 'mhtml--submode-captured-locals--cmacro) #@75 Access slot "captured-locals" of `mhtml--submode' struct CL-X. (fn CL-X) (defalias 'mhtml--submode-captured-locals #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 7] 5 (#$ . 7192)]) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put mhtml--submode-captured-locals side-effect-free t defalias copy-mhtml--submode copy-sequence] 4) #@166 compiler-macro for inlining `make-mhtml--submode'. (fn CL-WHOLE &cl-quote &key NAME END-TAG SYNTAX-TABLE PROPERTIZE KEYMAP CRUCIAL-CAPTURED-LOCALS CAPTURED-LOCALS) (defalias 'make-mhtml--submode--cmacro #[385 "\300\301\"A@\300\302\"A@\300\303\"A@\300\304\"A@\300\305\"A@\300\306\"A@\300\307\"A@\211\203Y \211@\310>\203A \211AA\262\202. \311 >A@\203P \312\262\202. \313\314@\"\210\202. \210\315\316\317\312\f\312\f\f\f\f\f\f\f&\f\207" [plist-member :name :end-tag :syntax-table :propertize :keymap :crucial-captured-locals :captured-locals (:name :end-tag :syntax-table :propertize :keymap :crucial-captured-locals :captured-locals :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:name :end-tag :syntax-table :propertize :keymap :crucial-captured-locals :captured-locals)" cl--defsubst-expand (name end-tag syntax-table propertize keymap crucial-captured-locals captured-locals) (cl-block make-mhtml--submode (record 'mhtml--submode name end-tag syntax-table propertize keymap crucial-captured-locals captured-locals))] 22 (#$ . 7631)]) (put 'make-mhtml--submode 'compiler-macro 'make-mhtml--submode--cmacro) #@146 Constructor for objects of type `mhtml--submode'. (fn &key NAME END-TAG SYNTAX-TABLE PROPERTIZE KEYMAP CRUCIAL-CAPTURED-LOCALS CAPTURED-LOCALS) (defalias 'make-mhtml--submode #[128 "\300\301\"A@\300\302\"A@\300\303\"A@\300\304\"A@\300\305\"A@\300\306\"A@\300\307\"A@\211\203Y \211@\310>\203A \211AA\262\202. \311 >A@\203P \312\262\202. \313\314@\"\210\202. \210\315\316&\207" [plist-member :name :end-tag :syntax-table :propertize :keymap :crucial-captured-locals :captured-locals (:name :end-tag :syntax-table :propertize :keymap :crucial-captured-locals :captured-locals :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:name :end-tag :syntax-table :propertize :keymap :crucial-captured-locals :captured-locals)" record mhtml--submode] 17 (#$ . 8802)]) (byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303& \207" [function-put make-mhtml--submode side-effect-free t cl-struct-define mhtml--submode nil cl-structure-object record ((cl-tag-slot) (name) (end-tag) (syntax-table) (propertize) (keymap) (crucial-captured-locals) (captured-locals)) cl-struct-mhtml--submode-tags] 11) #@75 Regexp matching the prefix of "crucial" buffer-locals we want to capture. (defconst mhtml--crucial-variable-prefix "\\(?:com\\(?:\\(?:ment\\|pletion\\)-\\)\\|electric-indent-\\|forward-sexp-function\\|major-mode\\|\\(?:smie\\|uncomment\\)-\\)" (#$ . 9967)) #@65 Regexp matching the prefix of buffer-locals we want to capture. (defconst mhtml--variable-prefix "\\(?:font-lock-\\|indent-line-function\\)" (#$ . 10230)) #@99 A wrapper for make-mhtml--submode that computes the buffer-local variables. (fn MODE &rest ARGS) (defalias 'mhtml--construct-submode #[385 "\304\211\305\306\"\307\310!r\211q\210\311\312\313\314\315!\316\"\317$\216 \210\320 \210\321\300!\204+ \322\300!\210\323\324 \211\203Y \211@\325 \326@!\"\203B \211B\262\325\n\326@!\"\203R \211B\262A\266\202\202- \210\327!>\204i \330\331\332D\"\210\211\333I\266\327!>\204 \330\331\332D\"\210\211\334I\266*\210\207" [font-lock-fontify-region-function mhtml--crucial-variable-prefix mhtml--variable-prefix cl-struct-mhtml--submode-tags nil apply make-mhtml--submode generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 font-lock-set-defaults variable-binding-locus make-local-variable font-lock-default-fontify-region buffer-local-variables string-match symbol-name type-of signal wrong-type-argument mhtml--submode 6 7] 12 (#$ . 10391)]) #@16 (fn SUBMODE) (defalias 'mhtml--mark-buffer-locals #[257 "\301!>\204 \302\303\304D\"\210\211\305H\211\205$ \211@\306@!\210A\266\202\202 \207" [cl-struct-mhtml--submode-tags type-of signal wrong-type-argument mhtml--submode 7 make-local-variable] 5 (#$ . 11367)]) #@39 List of all crucial variable symbols. (defvar mhtml--crucial-variables nil (#$ . 11644)) (make-variable-buffer-local 'mhtml--crucial-variables) #@16 (fn SUBMODE) (defalias 'mhtml--mark-crucial-buffer-locals #[257 "\302!>\204 \303\304\305D\"\210\211\306H\211\205) \211@\307@!\210\211@ BA\266\202\202 \207" [cl-struct-mhtml--submode-tags mhtml--crucial-variables type-of signal wrong-type-argument mhtml--submode 6 make-local-variable] 5 (#$ . 11794)]) (defconst mhtml--css-submode (mhtml--construct-submode 'css-mode :name "CSS" :end-tag "</style>" :syntax-table css-mode-syntax-table :propertize css-syntax-propertize-function :keymap css-mode-map)) (defconst mhtml--js-submode (mhtml--construct-submode 'js-mode :name "JS" :end-tag "</script>" :syntax-table js-mode-syntax-table :propertize 'js-syntax-propertize :keymap js-mode-map)) #@27 (fn SUBMODE &rest BODY) (defalias 'mhtml--with-locals '(macro . #[385 "\300\301\302\303\304DEE\301\302\305\304DEE\300\301\302\306\307\nDEE\301\302\310\307DEEBBBF\207" [cl-progv when mapcar #'car mhtml--submode-captured-locals #'cdr #'car mhtml--submode-crucial-captured-locals #'cdr] 13 (#$ . 12497)])) (byte-code "\300\301\302\303#\300\207" [function-put mhtml--with-locals lisp-indent-function 1] 4) #@51 Mode-line lighter indicating the current submode. (defalias 'mhtml--submode-lighter #[0 "m\203 o\204 `S\202 `\301\302\"\211\203+ \303!>\204% \304\305\306D\"\210\211\307H\202, \310\207" [cl-struct-mhtml--submode-tags get-text-property mhtml-submode type-of signal wrong-type-argument mhtml--submode 1 ""] 6 (#$ . 12922)]) #@262 Extend the font lock region according to HTML sub-mode needs. This is used via `font-lock-extend-region-functions'. It ensures that the font-lock region is extended to cover either whole lines, or to the spot where the submode changes, whichever is smallest. (defalias 'mhtml--extend-font-lock-region #[0 " \212b\210m\204 \302u\210\303`\304\302\305 $\306\304\"\306\304\"=\204$ T b\210o\204. \307u\210\310`\304\302\305\311!$\306 \304\"\306\304\"=\204F S)\312 \210U?\206U U?\207" [font-lock-beg font-lock-end nil previous-single-property-change mhtml-submode line-beginning-position get-text-property -1 next-single-property-change 2 font-lock-extend-region-multiline] 8 (#$ . 13257)]) #@41 (fn SUBMODE BEG END &optional LOUDLY) (defalias 'mhtml--submode-fontify-one-region #[1027 "\203t \205 \301\302\303!>\204 \304\305\306D\"\210\307H\"\205; \301\310\303!>\2046 \304\305\306 D\"\210\307H\"\311\312\313\314\315\n\n\n\n$\316\"\317$\320\203h \211A\262\242\321\211A\262\242DDB\262\202N \322\323\324\321DDE!\207\325 \210\326#\207" [cl-struct-mhtml--submode-tags mapcar car type-of signal wrong-type-argument mhtml--submode 7 cdr make-byte-code 0 "\300\205 \305\306\307\300!\f>\204 \310\311\312\300D\"\210\300\313H\"\300\2052 \305\314\307\300!\f>\204. \310\311\312\300D\"\210\300\313H\"\315\316\317\320\321\301\302\303#\322\"\323$\324\203Z \211A\262\242\325\211A\262\242DDB\262\202@ \326\327\330\325DDE!\207" vconcat vector [cl-struct-mhtml--submode-tags mapcar car type-of signal wrong-type-argument mhtml--submode 6 cdr make-byte-code 0 "\214\303\300\301\302#)\207" vconcat vector [font-lock-fontify-region] 4 nil quote eval let funcall] 10 nil quote eval let funcall font-lock-set-defaults font-lock-default-fontify-region] 15 (#$ . 13965)]) #@23 (fn BEG END LOUDLY) (defalias 'mhtml--submode-fontify-region #[771 "\300!\210W\203I \301\302\"\303\302\304\n$\305\n\n$\211:\203B \211@\306=\203B A@^\262\211AA\262]\262\210\262\210\202 U\203V U?\205[ \306BB\207" [syntax-propertize get-text-property mhtml-submode next-single-property-change nil mhtml--submode-fontify-one-region jit-lock-bounds] 14 (#$ . 15069)]) #@72 Record the last visited submode. This is used by `mhtml--pre-command'. (defvar mhtml--last-submode nil (#$ . 15473)) (make-variable-buffer-local 'mhtml--last-submode) #@51 Alist of stashed values of the crucial variables. (defvar mhtml--stashed-crucial-variables nil (#$ . 15646)) (make-variable-buffer-local 'mhtml--stashed-crucial-variables) (defalias 'mhtml--stash-crucial-variables #[0 "\302\303\"\211\207" [mhtml--crucial-variables mhtml--stashed-crucial-variables mapcar #[257 "\211\300p\"B\207" [buffer-local-value] 5 "\n\n(fn SYM)"]] 3]) #@14 (fn ALIST) (defalias 'mhtml--map-in-crucial-variables #[257 "\211\211\205 \211@\211@AL\210A\266\202\202 \207" [] 5 (#$ . 16029)]) (defalias 'mhtml--pre-command #[0 "\303`\304\"\211=?\2056 \211\203 \204 \305 \210\306\2030 \307! >\204* \310\311\312D\"\210\313H\2021 \n!\210\211\211\207" [mhtml--last-submode cl-struct-mhtml--submode-tags mhtml--stashed-crucial-variables get-text-property mhtml-submode mhtml--stash-crucial-variables mhtml--map-in-crucial-variables type-of signal wrong-type-argument mhtml--submode 6] 6]) #@20 (fn SUBMODE END) (defalias 'mhtml--syntax-propertize-submode #[514 "\212\301\302!>\204 \303\304\305D\"\210\306H\307#\203 \310\224\262)\311`\312\313\302!>\2046 \303\304\305\nD\"\210\314H\315\302\n!>\204L \303\304\305\fD\"\210 \316H\257#\210\302!>\204c \303\304\305D\"\210\317H`\"\210\211b\207" [cl-struct-mhtml--submode-tags search-forward type-of signal wrong-type-argument mhtml--submode 2 t 0 set-text-properties mhtml-submode syntax-table 3 local-map 5 4] 14 (#$ . 16571)]) #@18 (fn START END) (defalias 'mhtml-syntax-propertize #[514 "\302\303#\210b\210o\204# \304`S\305\"\211\203 \306\"\210\202\"