Files
emacsd/elpa/vue-mode-20190415.231/vue-mode.elc

69 lines
10 KiB
Plaintext
Raw Normal View History

2019-12-01 19:55:19 +01:00
;ELC
;;; Compiled
;;; in Emacs version 26.3
;;; 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\306\307\310\311\312\313\314\315\316\317\316\320& \210\321\322\323\324\325DD\326\327\330\314\307&\210\321\331\323\324\332DD\333\327\334\314\307&\207" [require mmm-mode mmm-cmds vue-html-mode ssass-mode edit-indirect custom-declare-group vue nil "Group for vue-mode" :prefix "vue-" :group languages :link (url-link :tag "Github" "https://github.com/CodeFalling/vue-mode") (emacs-commentary-link :tag "Commentary" "vue-mode") custom-declare-variable vue-modes funcall function #[0 "\300\207" [((:type template :name nil :mode vue-html-mode) (:type template :name html :mode vue-html-mode) (:type template :name jade :mode jade-mode) (:type template :name pug :mode pug-mode) (:type template :name slm :mode slim-mode) (:type template :name slim :mode slim-mode) (:type script :name nil :mode js-mode) (:type script :name js :mode js-mode) (:type script :name es6 :mode js-mode) (:type script :name babel :mode js-mode) (:type script :name coffee :mode coffee-mode) (:type script :name ts :mode typescript-mode) (:type script :name typescript :mode typescript-mode) (:type script :name tsx :mode typescript-tsx-mode) (:type style :name nil :mode css-mode) (:type style :name css :mode css-mode) (:type style :name stylus :mode stylus-mode) (:type style :name less :mode less-css-mode) (:type style :name postcss :mode css-mode) (:type style :name scss :mode css-mode) (:type style :name sass :mode ssass-mode) (:type i18n :name nil :mode json-mode) (:type i18n :name json :mode json-mode) (:type i18n :name yaml :mode yaml-mode))] 1] "A list of vue component languages.\n\nA component language consists of a langauge type, name, and\ncorresponding submode.\n\nThe language type is the tag which this languge is valid under -\none of template, script, or style.\n\nThe language name is the value of the lang=\"\" element in the\nopening tag of the language section. If there is no lang=\"\"\nelement, the the language name is nil.\n\nThe submode to activate is the major mode which should be used\nfor all text in the language section.\n\nFor example, somebody wishing to activate pug-mode in blocks like\n<template lang=\"pug\"> </template> would add an entry with the\nlanguage type to template, the language name to pug, and the\nsubmode to pug-mode." :type (repeat (list (const :format "Language Type: " :type) (choice (const template) (const script) (const style) (symbol :tag "Custom element type")) (const :format #1="" :name) (symbol :format "Language Name: %v") (const :format #1# :mode) (symbol :format "Submode to activate: %v"))) vue-dedicated-modes #[0 "\300\207" [nil] 1] "A list of modes to override in dedicated buffers.\n\nFor example, if you would like your javascript to display with\n`js-mode' in the root window and `js2-mode' in a dedicated buffer,\nadd an entry with a root mode of `js-mode' and dedicated mode of `js2-mode'" (plist :key-type (symbol :format "Root mode: %v") :value-type (symbol :format "Dedicated mode: %v"))] 12)
#@24 Keymap for `vue-mode'.
(defvar vue-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\211\207" [make-keymap define-key "\f" vue-mode-reparse " " vue-mode-edit-indirect-at-point] 5) (#$ . 3438))
#@80 If false, `vue-mode' still needs to prepare `mmm-mode' before being activated.
(defvar vue-initialized nil (#$ . 3652))
#@58 Matches anything but 'lang'. See `vue--front-tag-regex'.
(defconst vue--not-lang-key "\\(?:\\w*[^l]\\w\\w\\w=\\|\\w*[^a]\\w\\w=\\|\\w*[^n]\\w=\\|\\w*[^g]=\\|g=\\|\\w\\{5,\\}=\\)" (#$ . 3778))
#@131 A regular expression for the starting tags of template areas with languages.
To be formatted with the tag name, and the language.
(defconst vue--front-tag-lang-regex "<%s\\(?:\\(?:\\s-+\\w+=[\"'].*?[\"']\\)\\|\\(?:\\s-+scoped\\)\\|\\(?:\\s-+module\\)\\)*\\(?:\\s-+lang=[\"']%s[\"']\\)\\(?:\\(?:\\s-+\\w+=[\"'].*?[\"']\\)\\|\\(?:\\s-+scoped\\)\\|\\(?:\\s-+module\\)\\)* *>\n" (#$ . 3977))
#@98 A regular expression for the starting tags of template areas.
To be formatted with the tag name.
(defconst vue--front-tag-regex (concat "<%s" "\\(?:" "\\(?:\\s-+" vue--not-lang-key "[\"'][^\"']*?[\"']\\)" "\\|\\(?:\\s-+scoped\\)" "\\|\\(?:\\s-+module\\)" "\\)*" "\\s-*>\n") (#$ . 4371))
#@72 Add syntax highlighting regions to mmm-mode, according to `vue-modes'.
(defalias 'vue--setup-mmm #[0 "\211\203L\211@\304\305\"\304\306\"\304\307\"\310\311\312\"!\203%\311 #\202)\311\n\"\311\313\"\314\315\316\317\257C!\210\320\321\322#\266A\266\202\202\210\323\211\207" [vue-modes vue--front-tag-lang-regex vue--front-tag-regex vue-initialized plist-get :type :name :mode make-symbol format "vue-%s" "^</%s *>" mmm-add-classes :submode :front :back mmm-add-mode-ext-class vue-mode nil t] 16 (#$ . 4664)])
#@49 Reparse the buffer, reapplying all major modes.
(defalias 'vue-mode-reparse #[0 "\300 \207" [mmm-parse-buffer] 1 (#$ . 5202) nil])
#@219 An indent function which works on some modes where `mmm-indent-line' doesn't.
Works like `mmm-indent-line', but narrows the buffer before indenting to
appease modes which rely on constructs like (point-min) to indent.
(defalias 'vue-mmm-indent-line-narrowed #[0 "\303 \210\203!\214\304 \210\203\305!`Y\203 \202\n\306N )\207\307 \207" [mmm-current-overlay mmm-current-submode mmm-primary-mode mmm-update-submode-region mmm-narrow-to-submode-region overlay-end mmm-indent-line-function mmm-indent-line] 2 (#$ . 5340) nil])
#@183 Indent the region from START to END according to `mmm-indent-line-function'.
Then, indent all submodes overlapping the region according to
`mmm-indent-line-function'
(fn START END)
(defalias 'vue-mmm-indent-region #[514 "\212`W\203\300 \210\301y\210\202\302\"\211\2059\211@\303!b\210`\304!^W\2032\300 \210\301y\210\202A\266\202\202\262)\207" [indent-according-to-mode 1 mmm-overlays-overlapping overlay-start overlay-end] 8 (#$ . 5878) nil])
#@70 Open the section of the template at point with `edit-indirect-mode'.
(defalias 'vue-mode-edit-indirect-at-point #[0 "\203(\304 \n\"\206\f\n\305\303!\210\306\307\310\311\312!\313\"\314$C\315\316!\317!Sp#\207\320\321!\207" [mmm-current-overlay vue-dedicated-modes mmm-current-submode edit-indirect-after-creation-hook plist-get make-local-variable make-byte-code 0 "\300 \207" vconcat vector [] 1 edit-indirect-region overlay-start overlay-end user-error "Not in a template subsection"] 7 (#$ . 6345) nil])
#@181 Open all subsections with `edit-indirect-mode' in seperate windows.
If KEEP-WINDOWS is set, do not delete other windows and keep the root window
open.
(fn &optional KEEP-WINDOWS)
(defalias 'vue-mode-edit-all-indirect #[256 "\211\204\301 \210\302 r\303\304\305\306\307!\310\"\311$\216\312ed\"\211\203P\211@\313 \314\315\316\"\"\2060\315\316\"\317\320!\321!\"\322 \210r\211q\210 \210)\323\"\266A\266\202\202\210\324 \210*\210\211?\205`\325 \210\324 \207" [vue-dedicated-modes delete-other-windows internal--before-save-selected-window make-byte-code 0 "\301\300!\207" vconcat vector [internal--after-save-selected-window] 2 mmm-overlays-contained-in split-window-below plist-get overlay-get mmm-mode edit-indirect-region overlay-start overlay-end maximize-window set-window-buffer balance-windows delete-window] 10 (#$ . 6864) "P"])
(defvar vue-mode-hook nil)
(byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [vue-mode-hook variable-documentation put "Hook run after entering vue mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp vue-mode-map definition-name vue-mode] 4)
(defvar vue-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" [vue-mode-abbrev-table vue-mode-map variable-documentation put purecopy "Keymap for `vue-mode'." boundp vue-mode-syntax-table definition-name vue-mode (lambda (#1=#:def-tmp-var) (defvar vue-mode-syntax-table #1#)) make-syntax-table "Syntax table for `vue-mode'." (lambda (#1#) (defvar vue-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `vue-mode'." derived-mode-parent html-mode] 5)
#@466 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:
`vue-mode-map', `vue-mode-abbrev-table' and `vue-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 `vue-mode-hook', as the final or penultimate step
during initialization.
\{vue-mode-map}
(defalias 'vue-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  !\204e\331 \210\306\332!\210\333\306\334!\210\335)\336\337!\207" [delay-mode-hooks major-mode mode-name vue-mode-map vue-mode-syntax-table vue-mode-abbrev-table make-local-variable t html-mode vue-mode "vue" 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 vue--setup-mmm mmm-indent-line-function vue-mmm-indent-line-narrowed indent-region-function vue-mmm-indent-region run-mode-hooks vue-mode-hook local-abbrev-table vue-initialized] 5 (#$ . 8814) nil])
(byte-code "\301\302\303\304\"\210\305\306!\207" [mmm-global-mode maybe add-to-list auto-mode-alist ("\\.vue\\'" . vue-mode) provide vue-mode] 3)