;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307#\210\304\305\310\311#\210\304\312\306\313#\210\304\312\310\314#\210\304\315\306\316#\210\304\315\310\317#\210\304\320\306\321#\210\304\320\310\322#\210\323\324\325\326\327\330%\207" [require mmm-compat mmm-utils cl-lib put mmm-subregion-invalid-parent error-conditions (mmm-subregion-invalid-parent mmm-error error) error-message "Invalid submode region parent" mmm-subregion-invalid-placement (mmm-subregion-invalid-placement mmm-error error) "Submode region placement invalid" mmm-invalid-submode-class (mmm-invalid-submode-class mmm-error error) "Invalid or undefined submode class" mmm-no-matching-submode (mmm-no-matching-submode mmm-error error) "Internal error: no matching submode." custom-declare-group mmm nil "Multiple Major Modes in one buffer." :group tools] 6) (defvar mmm-c-derived-modes '(c-mode c++-mode objc-mode pike-mode java-mode jde-mode js-mode typescript-mode php-mode)) #@1858 Which local variables to save for major mode regions. Each element has the form (VARIABLE [TYPE [MODES]]), causing VARIABLE to be saved for all major modes in the list MODES. If MODES is t or absent, the variable is saved for all major modes. MODES can also be a function of no arguments which returns non-nil whenever the variable should be saved. TYPE should be either the symbol `global', meaning to save the variable globally, the symbol `buffer', meaning to save it per buffer, or the symbol `region', meaning to save it for each submode region. If TYPE has any other value, such as nil, or is absent, the variable is saved globally. If all optional parameters are omitted, the element may be simply VARIABLE instead of (VARIABLE). It is possible for VARIABLE to be not a symbol but a cons cell of the form (GETTER . SETTER), thus specifying special functions to set and get the value of the "variable". This is used for objects like local maps, syntax tables, etc. which need to be installed in a special way. GETTER should be a function of no arguments, and SETTER a function of one. In this case, even if TYPE and MODES are omitted, the list cannot be flattened--it must be ((GETTER . SETTER)). "Variables" of this type cannot be seen with `mmm-get-saved-local'. A single variable may appear more than once in this list, with different modes and/or types. If the same mode appears more than once for the same variable with different types, the behavior is undefined. Changing the value of this variable after MMM Mode has been activated in some buffer may produce unpredictable results. Globally saved variables are saved in the mmm-local-variables property of the mode symbol. Buffer saved variables are saved in the alist `mmm-buffer-saved-locals'. Region saved variables are saved in the mmm-local-variables property of the overlay. (defvar mmm-save-local-variables (byte-code "\302\303\304\305\306\307\310\311\312\313\205\314\315\316\317\320\321\322\323\324\325\326\327\330\331 E\332\331 E\333\331 E\334\331 E\335BBBBBBBBBBBBBBB\336\337\340\"\336\341\342\"\343%BBBBBBBBB\207" [mmm-xemacs mmm-c-derived-modes major-mode comment-start comment-end (comment-line-start-skip buffer (fortran-mode)) comment-start-skip (comment-column buffer) comment-indent-function comment-line-break-function sentence-end append (mode-popup-menu (((lambda nil current-menubar) . set-buffer-menubar))) (font-lock-keywords buffer) font-lock-set-defaults font-lock-major-mode font-lock-keywords-only font-lock-keywords-case-fold-search font-lock-syntax-table font-lock-mark-block-function font-lock-syntactic-keywords font-lock-syntactic-face-function parse-sexp-ignore-comments (c-basic-offset buffer (c-mode c++-mode objc-mode pike-mode java-mode jde-mode)) c-class-key nil c-extra-toplevel-key c-inexpr-class-key c-conditional-key (semantic-bovinate-toplevel-override semantic-toplevel-bovine-table) mapcar #[(var) "\302 E\207" [var mmm-c-derived-modes nil] 3] (c++-template-syntax-table c-<-op-cont-regexp c->-op-cont-regexp c-after-brace-list-key c-after-suffixed-type-decl-key c-after-suffixed-type-maybe-decl-key c-any-class-key c-asm-stmt-kwds c-assignment-op-regexp c-backslash-column c-basic-offset c-before-context-fontification-functions c-bitfield-kwds c-block-comment-prefix c-block-decls-with-vars c-block-prefix-charset c-block-stmt-1-2-key c-block-stmt-1-key c-block-stmt-1-kwds c-block-stmt-2-key c-block-stmt-2-kwds c-brace-list-key c-case-kwds-regexp c-cast-parens c-class-key c-class-kwds c-cleanup-list c-colon-type-list-re c-comment-only-line-offset c-comment-prefix-regexp c-comment-start-regexp c-cpp-defined-fns c-current-comment-prefix c-decl-block-key c-decl-hangon-key c-decl-prefix-or-start-re c-decl-prefix-re c-decl-spec-kwds c-decl-start-kwds c-decl-start-re c-doc-comment-start-regexp c-expr-kwds c-file-offsets c-file-style c-not-primitive-type-keywords-regexp c-hanging-braces-alist c-hanging-colons-alist c-hanging-comment-ender-p c-hanging-comment-starter-p c-hanging-semi&comma-criteria c-identifier-key c-identifier-last-sym-match c-identifier-start c-identifier-syntax-modifications c-identifier-syntax-table c-in-comment-lc-prefix c-indent-comment-alist c-indent-comments-syntactically-p c-indentation-style c-inexpr-block-kwds c-inexpr-class-kwds c-keywords c-keywords-obarray c-keywords-regexp c-known-type-key c-label-kwds c-label-kwds-regexp c-label-minimum-indentation c-lambda-kwds c-literal-start-regexp c-macro-with-semi-re c-nonlabel-token-key c-nonlabel-token-2-key c-nonsymbol-chars c-nonsymbol-token-regexp c-not-decl-init-keywords c-offsets-alist c-opt-<>-arglist-start c-opt-<>-arglist-start-in-paren c-opt-<>-sexp-key c-opt-access-key c-opt-asm-stmt-key c-opt-bitfield-key c-opt-block-decls-with-vars-key c-opt-block-stmt-key c-opt-cpp-prefix c-opt-cpp-start c-opt-decl-spec-key c-opt-friend-key c-opt-identifier-concat-key c-opt-inexpr-block-key c-opt-inexpr-brace-list-key c-opt-inexpr-class-key c-opt-lambda-key c-opt-method-key c-opt-postfix-decl-spec-key c-opt-type-component-key c-opt-type-concat-key c-opt-type-modifier-key c-opt-type-suffix-key c-other-decl-block-key c-other-decl-block-kwds c-other-decl-kwds c-overloadable-operators-regexp c-paragraph-separate c-paragraph-start c-paren-stmt-key c-primary-expr-regexp c-primitive-type-key c-primitive-type-kwds c-protection-kwds c-postfix-decl-spec-key c-recognize-<>-arglists c-recognize-knr-p c-recognize-paren-inits c-recognize-typeless-decls c-regular-keywords-regexp c-simple-stmt-key c-simple-stmt-kwds c-special-brace-lists c-specifier-key c-specifier-kwds c-stmt-delim-chars c-stmt-delim-chars-with-comma c-symbol-char-key c-symbol-key c-symbol-start c-syntactic-eol c-syntactic-ws-end c-syntactic-ws-start c-type-decl-prefix-key c-type-decl-suffix-key c-type-prefix-key c-typeof-key c-prefix-spec-kwds-re c-typedef-key c-typedef-decl-key comment-end comment-start comment-start-skip) #[(var) "\301\302E\207" [var nil (js-mode)] 3] (js--quick-match-re js--quick-match-re-func) (skeleton-transformation abbrev-mode local-abbrev-table ((syntax-table . set-syntax-table) buffer) (syntax-ppss-table buffer) ((current-local-map . use-local-map) buffer) paragraph-separate paragraph-start (whitespace-active-style buffer) (whitespace-display-table buffer) (whitespace-display-table-was-local buffer) (whitespace-font-lock buffer) (whitespace-font-lock-mode buffer) (whitespace-font-lock-keywords buffer) (whitespace-mode buffer) (whitespace-point--used buffer) (whitespace-point buffer) (whitespace-bob-marker buffer) forward-sexp-function smie-rules-function smie-grammar smie-forward-token-function smie-backward-token-function)] 28) (#$ . 1052)) #@104 Stores saved local variables for this buffer, by mode. Each element looks like (MODE (VAR VALUE) ...). (defvar mmm-buffer-saved-locals nil (#$ . 7733)) (make-variable-buffer-local 'mmm-buffer-saved-locals) #@146 Stores saved defaults for region-saved locals, by mode. Each element looks like (MODE (VAR VALUE) ...). Used to initialize new submode regions. (defvar mmm-region-saved-locals-defaults nil (#$ . 7946)) (make-variable-buffer-local 'mmm-region-saved-locals-defaults) #@230 Stores saved region locals for the dominant major mode. The dominant major mode is considered to be one region for purposes of saving region variables. Region-saved variables for submode regions are saved as overlay properties. (defvar mmm-region-saved-locals-for-dominant nil (#$ . 8219)) (byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\311\312\313\306\303\314\315&\210\316\317\320\321\306\303%\210\316\322\323\324\306\303%\210\316\325\326\327\306\303%\210\316\330\331\332\306\303%\210\316\333\334\335\306\303%\210\316\336\337\340\306\303%\210\316\341\342\343\306\303%\210\316\344\345\346\306\303%\210\316\347\304\350\306\303%\210\310\351\352\353\306\307\314\354&\210\310\355\356\357\306\307\314\354&\207" [make-variable-buffer-local mmm-region-saved-locals-for-dominant custom-declare-group mmm-faces nil "Faces and coloring for submode regions.\nIn general, only background colors should be set, to avoid interfering\nwith font-lock." :group mmm custom-declare-variable mmm-submode-decoration-level 1 "*Amount of coloring to use in submode regions.\nShould be either 0, 1, or 2, representing None, Low, and High amounts\nof coloring respectively.\n* None (0) means to use no coloring at all.\n* Low (1) means to use `mmm-default-submode-face' for all submode\n regions (except for \"non-submode\" regions, i.e. those that are of\n the primary mode) and `mmm-delimiter-face' for region delimiters.\n* High (2) means to use different faces for different types of submode\n regions and delimiters, such as initialization code, expressions that\n are output, declarations, and so on, as specified by the submode\n class. The default faces are still used for regions that do not\n specify a face." :type (choice (const :tag "None" 0) (const :tag "Low" 1) (const :tag "High" 2)) custom-declare-face mmm-init-submode-face ((((background light)) (:background "Pink")) (((background dark)) (:background "MediumOrchid")) (t (:background "Pink"))) "Face used for submodes containing initialization code." mmm-cleanup-submode-face ((((background light)) (:background "Wheat")) (((background dark)) (:background "peru")) (t (:background "Wheat"))) "Face used for submodes containing cleanup code." mmm-declaration-submode-face ((((background light)) (:background "Aquamarine")) (((background dark)) (:background "DarkTurquoise")) (t (:background "Aquamarine"))) "Face used for submodes containing declarations." mmm-comment-submode-face ((((background light)) (:background "SkyBlue")) (((background dark)) (:background "SteelBlue")) (t (:background "SkyBlue"))) "Face used for submodes containing comments and documentation." mmm-output-submode-face ((((background light)) (:background "Plum")) (((background dark)) (:background "MediumVioletRed")) (t (:background "Plum"))) "Face used for submodes containing expression that are output." mmm-special-submode-face ((((background light)) (:background "MediumSpringGreen")) (((background dark)) (:background "ForestGreen")) (t (:background "MediumSpringGreen"))) "Face used for special submodes not fitting any other category." mmm-code-submode-face ((((background light)) (:background "LightGray")) (((background dark)) (:background "DimGray")) (t (:background "LightGray"))) "Face used for submodes containing ordinary code." mmm-default-submode-face ((((background light)) (:background "gray85")) (((background dark)) (:background "gray20")) (t (:background "gray85"))) "Face used for all submodes at decoration level 1.\nAlso used at decoration level 2 for submodes not specifying a type." mmm-delimiter-face "Face used to mark submode delimiters." mmm-mode-string " MMM" "*String to display in mode line as MMM minor mode indicator." string mmm-submode-mode-line-format "~M[~m]" "*Format of the mode-line display when point is in a submode region.\n\n~M is replaced by the name of the primary major mode (which may be\nreplaced by a combined-mode function, see the info documentation).\n\n~m is replaced by the submode region overlay's `display-name'\nproperty, if it has one. Otherwise it is replaced by the mode name of\nthe submode region.\n\nIf `mmm-primary-mode-display-name' is non-nil, then this variable is\nused even when point is not in a submode region (i.e. it is in a\nprimary mode region), with ~m being replaced by the value of that\nvariable."] 8) #@107 If non-nil, displayed as the primary mode name in the mode line. See also `mmm-buffer-mode-display-name'. (defvar mmm-primary-mode-display-name nil (#$ . 12556)) (make-variable-buffer-local 'mmm-primary-mode-display-name) #@194 If non-nil, displayed in the mode line instead of the primary mode name, which is then shown next to it as if it were a submode when in a primary mode region, i.e. outside all submode regions. (defvar mmm-buffer-mode-display-name nil (#$ . 12785)) (make-variable-buffer-local 'mmm-buffer-mode-display-name) #@107 Set the mode line display correctly for the current submode, according to `mmm-submode-mode-line-format'. (defalias 'mmm-set-mode-line #[nil "\206 \306N\n\205\307\n\310\"\206 \306N \2031\311\312 B\313\f\206) BD\"\202H\f\203E\311\312 B\313\fBD\"\202H *\314 \207" [mmm-primary-mode-display-name mmm-primary-mode mmm-current-overlay mmm-current-submode submode primary mmm-mode-name overlay-get display-name mmm-format-string "~M" "~m" force-mode-line-update mmm-buffer-mode-display-name mmm-submode-mode-line-format mode-name] 5 (#$ . 13099)]) #@174 *List of submode classes that apply to a buffer. Generally set in a file local variables list. Can either be one symbol, or a list of symbols. Automatically buffer-local. (defvar mmm-classes nil (#$ . -13674)) (make-variable-buffer-local 'mmm-classes) #@103 *List of submode classes that apply to all buffers. Can be overridden in a file local variables list. (defvar mmm-global-classes '(universal) (#$ . -13935)) #@581 Alist of submode classes for major modes and/or file extensions. This variable can now be directly modified. Elements look like (MODE EXT CLASS), where MODE is a major mode, EXT is a regexp to match a filename such as in `auto-mode-alist', and CLASS is a submode class. CLASS is activated in all buffers in mode MODE (if non-nil) and whose filenames match EXT (if non-nil). If both MODE and EXT are nil, CLASS is activated in all buffers. If CLASS is the symbol t, MMM Mode is turned on in all buffers matching MODE and EXT, but no classes are activated. See `mmm-global-mode'. (custom-declare-variable 'mmm-mode-ext-classes-alist nil '(#$ . 14099) :group 'mmm :type '(repeat (list (symbol :tag "Major Mode") (string :tag "Filename Regexp") (symbol :tag "Class"))) :require 'mmm-mode) #@172 Add an element to `mmm-mode-ext-classes-alist', which see. That variable can now be directly modified, so this function is unnecessary. It probably won't go away, though. (defalias 'mmm-add-mode-ext-class #[(mode ext class) "\303\304 \nE\"\207" [mode ext class add-to-list mmm-mode-ext-classes-alist] 5 (#$ . 14893)]) #@421 User preferences about what major modes to use. Each element has the form (LANGUAGE . MODES) where LANGUAGE is the name of a programming language such as `perl' as a symbol, and MODES is a list of possible major modes to use, such as `cperl-mode' or `perl-mode'. The first element of MODES which is `fboundp' is used for submodes of LANGUAGE. The last element of MODES should be a mode which will always be available. (custom-declare-variable 'mmm-major-mode-preferences ''((perl cperl-mode perl-mode) (python python-mode python-mode) (javascript javascript-mode c++-mode) (java jde-mode java-mode c++-mode) (css css-mode c++-mode)) '(#$ . 15219) :group 'mmm :type '(repeat (cons symbol (repeat (restricted-sexp :match-alternatives (fboundp)))))) #@330 Add major mode MODE as acceptable for LANGUAGE. This sets the value of `mmm-major-mode-preferences'. If DEFAULT is non-nil, MODE is added at the front of the list of modes for LANGUAGE. Otherwise, it is added at the end. This may be used by packages to ensure that some mode is present, but not override any user-specified mode. (defalias 'mmm-add-to-major-mode-preferences #[(language mode &optional default) " \236\211\203 \203\n\f\nAB\241\202&\n\305\nA\fC\"\241\202&\306\301\fD\")\207" [language mmm-major-mode-preferences pair default mode append add-to-list] 5 (#$ . 15975)]) #@168 Return SYMBOL if it is a valid submode name, else nil. Valid submode names are either `fboundp' or present as the `car' of an element in `mmm-major-mode-preferences'. (defalias 'mmm-ensure-modename #[(symbol) "\302!\204\f \236\205 \207" [symbol mmm-major-mode-preferences fboundp] 2 (#$ . 16572)]) #@256 Convert MODE to a mode function, nil if impossible. Valid submode names are either `fboundp' or present as the `car' of an element in `mmm-major-mode-preferences'. In the latter case, the first `fboundp' element of the `cdr' is returned, or nil if none. (defalias 'mmm-modename->function #[(mode) "\302!\203\207\303\302 \236A\"@\207" [mode mmm-major-mode-preferences fboundp cl-remove-if-not] 4 (#$ . 16882)]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\313&\210\300\314\315\316\304\305\306\317&\210\300\320\321\322\304\305\306\323&\210\300\324\325\326\304\305\306\327&\207" [custom-declare-variable mmm-delimiter-mode 'fundamental-mode "Major mode used by default for delimiter regions.\nClasses are encouraged to override this by providing a delimiter-mode\nparameter-- see `mmm-classes-alist'." :group mmm :type function mmm-mode-prefix-key [(control 99) 37] "Prefix key for the MMM Minor Mode Keymap." vector mmm-command-modifiers '(control) "List of key modifiers for MMM command keys.\nThe MMM commands in the MMM Mode map, after `mmm-mode-prefix-key',\nare bound to default keys with these modifiers added. This variable\nmust be set before MMM Mode is loaded to have an effect.\n\nIt is suggested that the value of this variable be either nil or\n(control), as the default keys are either plain keys or have only a\nmeta modifier. The shift modifier is not particularly portable between\nEmacsen. The values of this variable and `mmm-insert-modifiers' should\nbe disjoint." (repeat (symbol :tag "Modifier")) mmm-insert-modifiers 'nil "List of key modifiers for MMM submode insertion keys.\nWhen a key pressed after `mmm-mode-prefix-key' has no MMM Mode command\nbinding, and its modifiers include these, then its basic type, plus any\nmodifiers in addition to these, is looked up in classes' :insert\nspecifications.\n\nIt is suggested that the value of this variable be either nil or\n(control), allowing submode classes to specify the presence or\nabsence of the meta modifier. The shift modifier is not particularly\nportable between Emacsen. The values of `mmm-command-modifiers' and\nthis variable should be disjoint." (repeat (symbol :tag "Modifier")) mmm-use-old-command-keys nil "Non-nil means to Use the old command keys for MMM Mode.\nMMM Mode commands then have no modifier while insertion commands have\na control modifier, i.e. `mmm-command-modifiers' is set to nil and\n`mmm-insert-modifiers' is set to (control). If nil, the values of\nthese variables are as the default, or whatever the user has set them\nto. This variable must be set before MMM Mode is loaded." boolean] 8) #@60 Use the old command keys (no control modifer) in MMM Mode. (defalias 'mmm-use-old-command-keys #[nil "\302\303\211\207" [mmm-command-modifiers mmm-insert-modifiers nil (control)] 2 (#$ . 19533)]) #@746 Hook run when MMM Mode is enabled in a buffer. A hook named mmm--hook is also run, if it exists. For example, `mmm-html-mode-hook' is run whenever MMM Mode is entered with HTML mode the dominant mode. A hook named mmm--submode-hook is run when a submode region of a given mode is created. For example, `mmm-cperl-mode-submode-hook' is run whenever a CPerl mode submode region is created, in any buffer. When this hooks are run, point is guaranteed to be at the start of the newly created submode region. Finally, a hook named mmm--class-hook is run whenever a buffer is first mmm-ified with a given submode class. For example, `mmm-mason-class-hook' is run whenever the `mason' class is first applied in a buffer. (custom-declare-variable 'mmm-mode-hook nil '(#$ . 19738) :group 'mmm :type 'hook) #@125 Run the hook named `mmm---hook', if it exists. If SUFFIX is nil or unsupplied, run `mmm--hook' instead. (defalias 'mmm-run-constructed-hook #[(body &optional suffix) "\303\203 \304\305 #\202\304\306 \"!\211\205\307\n!)\207" [suffix body hook intern-soft format "mmm-%s-%s-hook" "mmm-%s-hook" run-hooks] 6 (#$ . 20573)]) (defalias 'mmm-run-major-hook #[nil "\301!\207" [mmm-primary-mode mmm-run-constructed-hook] 2]) (defalias 'mmm-run-submode-hook #[(submode) "\301\302\"\207" [submode mmm-run-constructed-hook "submode"] 3]) #@86 List of submode classes for which hooks have already been run in the current buffer. (defvar mmm-class-hooks-run nil (#$ . 21135)) (make-variable-buffer-local 'mmm-class-hooks-run) (defalias 'mmm-run-class-hook #[(class) " \235?\205\302\303\"\210\304\301\"\207" [class mmm-class-hooks-run mmm-run-constructed-hook "class" add-to-list] 3]) #@512 Hook run when point moves into a region of the primary mode. Each submode region can have an `entry-hook' property which is run when they are entered, but since primary mode regions have no overlay to store properties, this is a buffer-local variable. N.B. This variable is not a standard Emacs hook. Unlike Emacs' "local hooks" it has *no* global value, only a local one. Its value should always be a list of functions (possibly empty) and never a single function. It may be used with `add-hook', however. (defvar mmm-primary-mode-entry-hook nil (#$ . 21486)) (byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\207" [make-variable-buffer-local mmm-primary-mode-entry-hook custom-declare-variable mmm-major-mode-hook nil "Hook run whenever a new major mode is finished starting up.\nMMM Mode implements this with a hack (see comments in the source) so\nthat `mmm-global-mode' will function correctly, but makes this hook\navailable so that others can take advantage of the hack as well.\n\nNote that file local variables have *not* been processed by the time\nthis hook is run. If a function needs to inspect them, it should also\nbe added to `find-file-hook'. However, `find-file-hook' is not run\nwhen creating a non-file-based buffer, or when changing major modes in\nan existing buffer." :group mmm :type hook] 8) (defalias 'mmm-run-major-mode-hook #[nil "\303\211\205\n@\3041 0\210\202\210\nA\211\204\303*\207" [mmm-major-mode-hook func --dolist-tail-- nil (error)] 3]) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\300\312\313\314\304\305\306\315&\207" [custom-declare-variable mmm-global-mode nil "Specify in which buffers to turn on MMM Mode automatically.\n\n- If nil, MMM Mode is never enabled automatically.\n- If t, MMM Mode is enabled automatically in all buffers.\n- If any other symbol, MMM mode is enabled only in those buffers that\n have submode classes associated with them. See `mmm-classes' and\n `mmm-mode-ext-classes-alist' for more information." :group mmm :type (choice (const :tag "Always" t) (const :tag "Never" nil) (other :tag "Maybe" maybe)) :require mmm-mode mmm-never-modes '(help-mode Info-mode dired-mode comint-mode telnet-mode shell-mode eshell-mode forms-mode) "List of modes in which MMM Mode is never activated." (repeat (symbol :tag "Mode"))] 10) #@250 List of modes for which the temporary buffers MMM creates have a file name. In these modes, this file name is the same as that of the parent buffer. In general, this has been found to cause more problems than it solves, but some modes require it. (defvar mmm-set-file-name-for-modes '(mew-draft-mode) (#$ . 23823)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\306\307&\210\314\310!\207" [custom-declare-variable mmm-parse-when-idle nil "Non-nil to automatically reparse the buffer when it has some\n modifications and Emacs has been idle for `mmm-idle-timer-delay'." :type boolean :group mmm mmm-idle-timer-delay 0.2 "Delay in secs before re-parsing after user makes changes." number make-variable-buffer-local] 8) #@19 Private variable. (defvar mmm-mode-parse-timer nil (#$ . 24578)) (make-variable-buffer-local 'mmm-mode-parse-timer) #@19 Private variable. (defvar mmm-mode-buffer-dirty nil (#$ . 24700)) (make-variable-buffer-local 'mmm-mode-buffer-dirty) (defalias 'mmm-mode-edit #[(_beg _end _len) "\301\302 \207" [mmm-mode-buffer-dirty t mmm-mode-reset-timer] 1]) (defalias 'mmm-mode-reset-timer #[nil "\203\302!\210\303 \304\305p$\211\207" [mmm-mode-parse-timer mmm-idle-timer-delay cancel-timer run-with-idle-timer nil mmm-mode-idle-reparse] 5]) (defalias 'mmm-mode-idle-reparse #[(buffer) "\303!\205rq\210 \205\304 \210\305\211\211)\207" [buffer mmm-mode-buffer-dirty mmm-mode-parse-timer buffer-live-p mmm-apply-all nil] 3]) #@117 Non-nil means MMM Mode is turned on in this buffer. Do not set this variable directly; use the function `mmm-mode'. (defvar mmm-mode nil (#$ . 25315)) (make-variable-buffer-local 'mmm-mode) #@47 The primary major mode in the current buffer. (defvar mmm-primary-mode nil (#$ . 25511)) (make-variable-buffer-local 'mmm-primary-mode) #@8138 Alist containing all defined mmm submode classes. A submode class is a named recipe for parsing a document into submode regions, and sometimes for inserting new ones while editing. Each element of this alist looks like (CLASS . ARGS) where CLASS is a symbol naming the submode class and ARGS is a list of keyword arguments, called a "class specifier". There are a large number of accepted keyword arguments in the class specifier. The argument CLASSES, if supplied, must be a list of other submode class names, or class specifiers, representing other classes to call recursively. The FACE arguments of these classes are overridden by the FACE argument of this class. If the argument CLASSES is supplied, all other arguments to this class are ignored. That is, "grouping" classes can do nothing but group other classes. The argument HANDLER, if supplied, also overrides any other processing. It must be a function, and all the arguments are passed to it as keywords, and it must do everything. See `mmm-ify' for what sorts of things it must do. This back-door interface should be cleaned up. The optional argument FACE gives the display face of the submode regions under high decoration (see `mmm-submode-decoration-level'). It must be a valid face. The standard faces used for submode regions are `mmm-*-submode-face' where * is one of `init', `cleanup', `declaration', `comment', `output', `special', or `code'. A more flexible alternative is the argument MATCH-FACE. MATCH-FACE can be a function, which is called with one argument, the form of the front delimiter (found from FRONT-FORM, below), and should return the face to use. It can also be an alist, with each element of the form (DELIM . FACE). If neither CLASSES nor HANDLER are supplied, either SUBMODE or MATCH-SUBMODE must be. SUBMODE specifies the submode to use for the submode regions, a symbol such as `cperl-mode' or `emacs-lisp-mode', while MATCH-SUBMODE must be a function to be called immediately after a match is found for FRONT, which is passed one argument, the form of the front delimiter (found from FRONT-FORM, below), and return a symbol such as SUBMODE would be set to. If MATCH-SUBMODE detects an invalid match--for example a specified mode which is not `fboundp'--it should (signal 'mmm-no-matching-submode nil). FRONT and BACK are the means to find the submode regions, and can be either buffer positions (number-or-markers), regular expressions, or functions. If they are absolute buffer positions, only one submode region is created, from FRONT to BACK. This is generally not used in named classes. (Unnamed classes are created by interactive commands in `mmm-interactive-history'). If FRONT is a regexp, then that regexp is searched for, and the end of its FRONT-MATCH'th match (or the beginning thereof, if INCLUDE-FRONT is non-nil), plus FRONT-OFFSET, becomes the beginning of the submode region. If FRONT is a function, that function is called instead, and must act somewhat like a search, in that it should start at point, take one argument as a search bound, and set the match data. A similar pattern is followed for BACK (the search starts at the beginning of the submode region), save that the beginning of its BACK-MATCH'th match (or the end, if INCLUDE-BACK is non-nil) becomes the end of the submode region, plus BACK-OFFSET. If SAVE-MATCHES is non-nil, then BACK, if it is a regexp, is formatted by replacing strings of the form "~N" by the corresponding value of (match-string n) after matching FRONT. FRONT-MATCH and BACK-MATCH default to zero. They specify which sub-match of the FRONT and BACK regexps to treat as the delimiter. This number will be passed to any calls to `match-beginning' and company. FRONT- and BACK-OFFSET default to 0. In addition to numbers, they can also be functions to call which should move point to the correct position for the beginning or end of the submode region. Common choices include `beginning-of-line' and `end-of-line', and new functions can of course be written. They can also be lists which will be applied in sequence, such as (end-of-line 1) meaning move to end of line and then forward one character. FRONT-VERIFY and BACK-VERIFY, if supplied, must be functions that inspect the match data to see if a match found by FRONT or BACK respectively is valid. FRONT-DELIM (resp. BACK-DELIM), if supplied, can take values like those of FRONT-OFFSET (resp. BACK-OFFSET), specifying the offset from the start (resp. end) of the match for FRONT (resp. BACK) to use as the starting (resp. ending) point for the front (resp. back) delimiter. If nil, it means not to make a region for the respective delimiter at all. DELIMITER-MODE, if supplied, specifies what submode to use for the delimiter regions, if any. If `nil', the primary mode is used. If not supplied, `mmm-delimiter-mode' is used. FRONT-FACE and BACK-FACE specify faces to use for displaying the delimiter regions, under high decoration. FRONT-FORM and BACK-FORM, if given, must supply a regexp used to match the *actual* delimiter. If they are strings, they are used as-is. If they are functions, they are called and must inspect the match data. If they are lists, their `car' is taken as the delimiter. The default for both is (regexp-quote (match-string 0)). The last case--them being a list--is usually used to set the delimiter to a function. Such a function must take 1-2 arguments, the first being the overlay in question, and the second meaning to insert the delimiter and adjust the overlay rather than just matching the delimiter. See `mmm-match-front', `mmm-match-back', and `mmm-end-current-region'. CASE-FOLD-SEARCH, if specified, controls whether the search is case-insensitive. See `case-fold-search'. It defaults to `t'. CREATION-HOOK, if specified, should be a function which is run whenever a submode region is created, with point at the beginning of the new region. One use for it is to set region-saved local variables (see `mmm-save-local-variables'). INSERT specifies the keypress insertion spec for such submode regions. INSERT's value should be list of elements of the form (KEY NAME . SPEC). Each KEY should be either a character, a function key symbol, or a dotted list (MOD . KEY) where MOD is a symbol for a modifier key. The use of any other modifier than meta is discouraged, as `mmm-insert-modifiers' is sometimes set to (control), and other modifiers are not very portable. Each NAME should be a symbol representing the insertion for that key. Each SPEC can be either a skeleton, suitable for passing to `skeleton-insert' to create a submode region, or a dotted pair (OTHER-KEY . ARG) meaning to use the skeleton defined for OTHER-KEY but pass it the argument ARG as the `str' variable, possible replacing a prompt string. Skeletons for insertion should have the symbol `_' where point (or wrapped text) should go, and the symbol `@' in four different places: at the beginning of the front delimiter, the beginning of the submode region, the end of the submode region, and the end of the back delimiter. If END-NOT-BEGIN is non-nil, it specifies that a BACK delimiter cannot begin a new submode region. MATCH-NAME, if supplied, specifies how to determine the "name" for each submode region. It must be a string or a function. If it is a function, it is passed the value of FRONT-FORM and must return the name to use. If it is a string, it is used as-is unless SAVE-NAME has a non-nil value, in which case, the string is interpreted the same as BACK when SAVE-MATCHES is non-nil. If MATCH-NAME is not specified, the regions are unnamed. Regions with the same name are considered part of the same chunk of code, and formatted as such, while unnamed regions are not grouped with any others. As a special optimization for insertion, if SKEL-NAME is non-nil, the insertion code will use the user-prompted string value as the region name, instead of going through the normal matching procedure. PRIVATE, if supplied and non-nil, means that this class is a private or internal class, usually one invoked by another class via :classes, and is not for the user to see. (defvar mmm-classes-alist nil (#$ . 25655)) #@57 Add the submode classes CLASSES to `mmm-classes-alist'. (defalias 'mmm-add-classes #[(classes) "\303\211\205\n@\304\305 \"\210\nA\211\204\303*\207" [classes class --dolist-tail-- nil add-to-list mmm-classes-alist] 4 (#$ . 33842)]) #@127 Add CLASSES and a "grouping class" named GROUP which calls them all. The CLASSES are all made private, i.e. non-user-visible. (defalias 'mmm-add-group #[(group classes) "\302\303\304\"!\210\305\306 \307\303\310\"E\"\207" [classes group mmm-add-classes mapcar #[(class) "\301\302\"\207" [class append (:private t)] 3] add-to-list mmm-classes-alist :classes cl-first] 7 (#$ . 34089)]) #@107 Add CLASSES to the "grouping class" named GROUP. The CLASSES are all made private, i.e. non-user-visible. (defalias 'mmm-add-to-group #[(group classes) "\302\303\304\"!\210\305 \306\307\310 \306\"\303\311\"\"#\207" [classes group mmm-add-classes mapcar #[(class) "\301\302\"\207" [class append (:private t)] 3] mmm-set-class-parameter :classes append mmm-get-class-parameter cl-first] 8 (#$ . 34482)]) #@30 Current version of MMM Mode. (defconst mmm-version "0.5.8" (#$ . 34893)) (defalias 'mmm-version #[nil "\301\302\"\207" [mmm-version message "MMM Mode version %s by Michael Abraham Shulman"] 3 nil nil]) #@175 Name for temporary buffers created by MMM Mode. Using non-special name, so that font-lock-mode will be enabled automatically when appropriate, and will set all related vars. (defvar mmm-temp-buffer-name "mmm-temp-buffer" (#$ . 35103)) #@45 Bound to t when working in the temp buffer. (defvar mmm-in-temp-buffer nil (#$ . 35344)) #@174 History of interactive mmm-ification in the current buffer. Elements are either submode class symbols or class specifications. See `mmm-classes-alist' for more information. (defvar mmm-interactive-history nil (#$ . 35440)) (make-variable-buffer-local 'mmm-interactive-history) (defalias 'mmm-add-to-history #[(class) "\301\302\"\207" [class add-to-list mmm-interactive-history] 3]) #@64 Clears history of interactive mmm-ification in current buffer. (defalias 'mmm-clear-history #[nil "\301\211\207" [mmm-interactive-history nil] 2 (#$ . 35829) nil]) #@123 List of classes associated with current buffer by mode and filename. Set automatically from `mmm-mode-ext-classes-alist'. (defvar mmm-mode-ext-classes nil (#$ . 36001)) (make-variable-buffer-local 'mmm-mode-ext-classes) #@124 Return classes for current buffer from major mode and filename. Uses `mmm-mode-ext-classes-alist' to find submode classes. (defalias 'mmm-get-mode-ext-classes #[nil "\206 \302\303\304\305 \"\"\211\207" [mmm-mode-ext-classes mmm-mode-ext-classes-alist mapcar cl-third cl-remove-if-not mmm-mode-ext-applies] 5 (#$ . 36228)]) #@49 Clear classes added by major mode and filename. (defalias 'mmm-clear-mode-ext-classes #[nil "\301\211\207" [mmm-mode-ext-classes nil] 2 (#$ . 36560)]) (defalias 'mmm-mode-ext-applies #[(element) "\211G\306U\203 \211A\242\202\307\310\311 GD\" \211A\242 \242\n\2031\n \206-=\2022\312\205N \203M\313 \205N\314 \315\216\316 \313 \"*\202N\312,\207" [element #1=#:--cl-rest-- mode ext _class mmm-primary-mode 3 signal wrong-number-of-arguments (mode ext _class) t buffer-file-name match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match major-mode save-match-data-internal] 5]) #@197 Return a list of all classes applicable to the current buffer. These come from mode/ext associations, `mmm-classes', and interactive history, as well as `mmm-global-classes' if GLOBAL is non-nil. (defalias 'mmm-get-all-classes #[(global) "\304 <\203 \202 C\n\205 \305 $\207" [mmm-interactive-history mmm-classes global mmm-global-classes append mmm-get-mode-ext-classes] 5 (#$ . 37209)]) (provide 'mmm-vars)