;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306!\207" [require sgml-mode cl-lib mmm-vars mmm-region mmm-add-classes ((erb :submode ruby-mode :front "<%[#=]?" :back "-?%>" :match-face (("<%#" . mmm-comment-submode-face) ("<%=" . mmm-output-submode-face) ("<%" . mmm-code-submode-face)) :insert ((37 erb-code nil @ "<%" @ " " _ " " @ "%>" @) (35 erb-comment nil @ "<%#" @ " " _ " " @ "%>" @) (61 erb-expression nil @ "<%=" @ " " _ " " @ "%>" @)) :creation-hook mmm-erb-mark-as-special) (ejs :submode js-mode :front "<%[#=]?" :back "-?%>" :match-face (("<%#" . mmm-comment-submode-face) ("<%=" . mmm-output-submode-face) ("<%" . mmm-code-submode-face)) :insert ((37 ejs-code nil @ "<%" @ " " _ " " @ "%>" @) (35 ejs-comment nil @ "<%#" @ " " _ " " @ "%>" @) (61 ejs-expression nil @ "<%=" @ " " _ " " @ "%>" @)) :creation-hook mmm-erb-mark-as-special))] 2) #@50 Hook function to run in ERB and EJS tag regions. (defalias 'mmm-erb-mark-as-special #[nil "\301\302\303#\207" [mmm-current-overlay overlay-put mmm-special-tag t] 4 (#$ . 966)]) (defvar html-erb-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [html-erb-mode-hook variable-documentation put "Hook run after entering ERB-HTML mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp html-erb-mode-map definition-name html-erb-mode] 4) (defvar html-erb-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" [html-erb-mode-abbrev-table html-erb-mode-map variable-documentation put purecopy "Keymap for `html-erb-mode'." boundp html-erb-mode-syntax-table definition-name html-erb-mode (lambda (#1=#:def-tmp-var) (defvar html-erb-mode-syntax-table #1#)) make-syntax-table "Syntax table for `html-erb-mode'." (lambda (#1#) (defvar html-erb-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `html-erb-mode'." derived-mode-parent html-mode] 5) #@491 Major mode derived from `html-mode' by `define-derived-mode'. It inherits all of the parent's attributes, but has its own keymap, abbrev table and syntax table: `html-erb-mode-map', `html-erb-mode-abbrev-table' and `html-erb-mode-syntax-table' which more-or-less shadow html-mode's corresponding tables. In addition to any hooks its parent mode might have run, this mode runs the hook `html-erb-mode-hook', as the final or penultimate step during initialization. \{html-erb-mode-map} (defalias 'html-erb-mode #[nil "\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\2036 \321 =\203<\322\f\323 \"\210)\324!\325\"\204V!\"=\204V\326!\325\"C#\210\327 !\210\330\f!\210!\"\331#\306\332!\210\333\334\335\336\331\307$\210)\337\340!\207" [delay-mode-hooks major-mode mode-name html-erb-mode-map html-erb-mode-syntax-table parent make-local-variable t html-mode html-erb-mode "ERB-HTML" 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 nil mmm-indent-line-function mmm-erb-indent-line add-hook mmm-after-syntax-propertize-functions html-erb-after-syntax-propertize run-mode-hooks html-erb-mode-hook html-erb-mode-abbrev-table local-abbrev-table sgml-unclosed-tags] 6 (#$ . 2319) nil]) (defalias 'html-erb-after-syntax-propertize #[(overlay _mode beg end) "\2057\306 \307\211\307\310\216 \211b\210`W\2055\311\312\307#\2055\313\314\224\314\225\315\316$\210\202.\207" [overlay #1=#:modified buffer-undo-list inhibit-read-only inhibit-modification-hooks beg buffer-modified-p t #[nil "?\205\301\302!\207" [#1# restore-buffer-modified-p nil] 2] re-search-forward "<\\|>" put-text-property 0 syntax-table (1) end start] 6]) #@40 Indent the current line intelligently. (defalias 'mmm-erb-indent-line #[nil "i\303 Z\304 \210\305 \210 \203\"\n\203\"\306 !\307 W\203\"\310 \210\202%\311 \210\312V\205-u)\207" [offset mmm-current-overlay mmm-current-submode current-indentation back-to-indentation mmm-update-submode-region overlay-start line-beginning-position mmm-erb-indent-line-submode mmm-erb-indent-line-primary 0] 2 (#$ . 4211) nil]) #@31 Indent line within a submode. (defalias 'mmm-erb-indent-line-submode #[nil "\304\305 !\212\306 \210`)X\203\307 \202R\214\212\310 !b\210\311\312!\204(i\313\314\"\210)\310 !\305 !}\210\315\n! \210\203E\212\310 !b\210\316!\210))\317 \320U\205R\307\321 !!)\207" [added-whitespace mmm-current-overlay mmm-current-submode mmm-primary-mode nil overlay-end back-to-indentation mmm-erb-indent-to-region-start overlay-start looking-at "^\\|\\s-*$" insert-char 32 mmm-erb-orig-indent-function delete-char current-indentation 0 mmm-erb-indent-offset] 3 (#$ . 4632)]) #@74 Indent line to match start of region, possibly adding ADDITIONAL-OFFSET. (defalias 'mmm-erb-indent-to-region-start #[(&optional additional-offset) "\302\212\303!Sb\210\304 \206\305\\)!\207" [mmm-current-overlay additional-offset indent-line-to overlay-start current-indentation 0] 3 (#$ . 5204)]) #@30 Indent line in primary mode. (defalias 'mmm-erb-indent-line-primary #[nil "`\306y\210\307 \210\310 \211@\311=\203 Ab\210\307 \210)`\312\n\"\313 \314\211\315 :\203o @\316!\211\203f\317=\203W\f\211\313V\262\203f\fS\202f\f\317=\203c\313\202d\320\\ A\314\202.,b\210\320\210`\312\"\314\211\315:\203\265@\316!\211\321=\204\265\322>\203\252\fSA\314\202\211-b\210\323! \210\324 \325!\326\f\203\327\f_\202\330\313\\!.\207" [here lcon start regions n #1=#:--cl-var-- -1 back-to-indentation sgml-lexical-context tag mmm-regions-in 0 nil t mmm-erb-scan-region close 1 open (middle close) mmm-erb-orig-indent-function current-indentation mmm-erb-indent-offset indent-line-to region type #2=#:--cl-var-- eol #3=#:--cl-var-- #4=#:--cl-var-- mmm-primary-mode indent indent-step] 5 (#$ . 5511)]) (defalias 'mmm-erb-scan-region #[(region) "\205L\211G\306U\203 \211A\242\202\307\310\311 GD\" \211A\242 \211A\242 \242\312\313\n\"\211\205J\314 \315\"\205J\212 b\210\316\317!\210\f!).\207" [region #1=#:--cl-rest-- submode beg end ovl 4 signal wrong-number-of-arguments (submode beg end ovl) plist-get (ruby-mode mmm-erb-scan-erb js-mode mmm-erb-scan-ejs) overlay-get mmm-special-tag skip-syntax-forward "-" scan-fn] 5]) #@42 Regexp to match the end of a Ruby block. (defconst mmm-erb-ruby-close-re "\\\\|}" (#$ . 6831)) (defalias 'mmm-erb-scan-erb #[(limit) "\303\304!\203\305\207\303\306!\203\307\207\303!\203\310\207\311\312 \313#\2059`\211 W\2053 b\210\314\315!\210\316\n\")?\2059\305\207" [mmm-erb-ruby-close-re limit pt looking-at "\\(?:if\\|unless\\|for\\|while\\)\\b" open "\\(?:else\\|elsif\\)\\b" middle close re-search-forward "\\(?: +do +\\| *{ *\\)\\(?:|[A-Za-z0-9_, ]*|\\)? *" t skip-syntax-backward "-" looking-back] 5]) (defalias 'mmm-erb-scan-ejs #[(limit) "\301\302!\203\303\207\301\304!\203\305\207\301\306!\203\307\207\310\311\312#\205!\303\207" [limit looking-at "\\(?:if\\|for\\|while\\)\\b" open "} *else\\b" middle "}" close re-search-forward " *{ *" t] 4]) (defalias 'mmm-erb-orig-indent-function #[(mode) "\301N\207" [mode mmm-indent-line-function] 2]) (defvar mmm-erb-offset-var-alist '((html-erb-mode . sgml-basic-offset) (nxml-web-mode . nxml-child-indent))) (defalias 'mmm-erb-indent-offset #[(mode) "\303 \"A\211\205\f\nJ)\207" [mode mmm-erb-offset-var-alist name assoc] 4]) (defvar nxml-web-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-web-mode-hook variable-documentation put "Hook run after entering nXML-Web 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-web-mode-map definition-name nxml-web-mode] 4) (defvar nxml-web-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-web-mode-abbrev-table nxml-web-mode-map variable-documentation put purecopy "Keymap for `nxml-web-mode'." boundp nxml-web-mode-syntax-table definition-name nxml-web-mode (lambda (#1=#:def-tmp-var) (defvar nxml-web-mode-syntax-table #1#)) make-syntax-table "Syntax table for `nxml-web-mode'." (lambda (#1#) (defvar nxml-web-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `nxml-web-mode'." derived-mode-parent nxml-mode] 5) #@491 Major mode derived from `nxml-mode' by `define-derived-mode'. It inherits all of the parent's attributes, but has its own keymap, abbrev table and syntax table: `nxml-web-mode-map', `nxml-web-mode-abbrev-table' and `nxml-web-mode-syntax-table' which more-or-less shadow nxml-mode's corresponding tables. In addition to any hooks its parent mode might have run, this mode runs the hook `nxml-web-mode-hook', as the final or penultimate step during initialization. \{nxml-web-mode-map} (defalias 'nxml-web-mode #[nil "\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\2036 \321 =\203<\322\f\323 \"\210)\324\325\"\204V=\204V\326\325C#\210\327 !\210\330\f!\210\306\331!\210\332)\333\334!\207" [delay-mode-hooks major-mode mode-name nxml-web-mode-map nxml-web-mode-syntax-table parent make-local-variable t nxml-mode nxml-web-mode "nXML-Web" 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 mmm-indent-line-function mmm-erb-indent-line run-mode-hooks nxml-web-mode-hook nxml-web-mode-abbrev-table local-abbrev-table] 6 (#$ . 9117) nil]) (provide 'mmm-erb)