;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@36 Current version of MATLAB(R) mode. (defconst matlab-mode-version "5.0" (#$ . 87)) (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&\210\316\317\320\321\314\307\322\323&\210\316\324\325\326\314\307\322\327&\210\316\330\325\331\314\307\322\327&\210\316\332\333\334\314\307\322\327&\210\316\335\336\337\314\307\322\327&\210\316\340\341\342\314\307\322\343&\210\316\344\345\346\314\307\322\347&\210\316\350\351\352\314\307\322\327&\210\316\353\354\355\314\307\322\356&\210\316\357\336\360\314\307\322\361&\210\316\362\363\364\314\307\322\365&\210\366\362!\210\367\362\370\371#\210\316\372\373\374\314\307\322\361&\210\366\372!\210\367\372\370\371#\207" [require matlab-compat matlab-syntax matlab-scan easymenu derived custom-declare-group matlab nil "MATLAB(R) mode." :prefix "matlab-" :group languages custom-declare-variable matlab-mode-for-new-mfiles 'maybe "*Enter `matlab-mode' for new *.m files.\nThe `matlab' package will automatically enter `matlab-mode' when\nthe first part of a *.m file is doesn't contain Objective-C\ncomments or '#' characters. If you want new (empty) files to\nautomatically enter `matlab-mode', specify this item as\nt (always). If you specify 'maybe, new files will enter\n`matlab-mode' when you have an existing MATLAB buffer. Specifying\nnil (never) means that new *.m files will not enter\n`matlab-mode', and with default Emacs settings they will enter\n`objc-mode'" :type (choice (const :tag "Always" t) (const :tag "Never" nil) (const :tag "Maybe" maybe)) matlab-indent-level 4 "*The basic indentation amount in `matlab-mode'." integer matlab-continuation-indent-level "*Basic indentation after continuation if no other methods are found." matlab-array-continuation-indent-level 2 "*Basic indentation after continuation within an array if no other methods are found." matlab-cont-requires-ellipsis t "*Specify if ellipses are required at the end of a line for continuation.\nFuture versions of Matlab may not require ellipses ... , so a heuristic\ndetermining if there is to be continuation is used instead." matlab-case-indent-level '(2 . 2) "*How far to indent case/otherwise statements in a switch.\nThis can be an integer, which is the distance to indent the CASE and\nOTHERWISE commands, and how far to indent commands appearing in CASE\nand OTHERWISE blocks. It can also be a cons cell which is of form\n (CASEINDENT . COMMANDINDENT)\nwhere CASEINDENT is the indentation of the CASE and OTHERWISE\nstatements, and COMMANDINDENT is the indentation of commands appearing\nafter the CASE or OTHERWISE command.\n\nNote: Currently a bug exists if:\n CASEINDENT+COMMANDINDENT != `matlab-indent-level'\nso if you customize these variables, follow the above rule, and you\nshould be ok." sexp matlab-indent-past-arg1-functions "\\_<\\([sg]et\\(_param\\)?\\|waitfor\\|notify\\)\\_>" "*Regex describing functions whose first arg is special.\nThis specialness means that all following parameters which appear on\ncontinued lines should appear indented to line up with the second\nargument, not the first argument." string matlab-arg1-max-indent-length 15 "*The maximum length to indent when indenting past arg1.\nIf arg1 is exceptionally long, then only this number of characters\nwill be indented beyond the open paren starting the parameter list." matlab-maximum-indents '((61 10 . 4) (40 . 50) (91 . 20) (123 . 20)) "Alist of maximum indentations when lining up code.\nEach element is of the form (CHAR . INDENT) where char is a character\nthe indent engine is using, and INDENT is the maximum indentation\nallowed. Indent could be of the form (MAXIMUM . INDENT), where\nMAXIMUM is the maximum allowed calculated indent, and INDENT is the\namount to use if MAXIMUM is reached." (repeat (cons (character :tag "Open List Character") (sexp :tag "Number (max) or cons (max indent)"))) matlab-align-to-paren "*Whether continuation lines should be aligned to the opening parenthesis.\nWhen non-nil, continuation lines are aligned to the opening parenthesis if the\nopening is not followed by only spaces and ellipses. When nil, continued lines\nare simply indented by `matlab-continuation-indent-level'." boolean matlab-indent-function-body 'MathWorks-Standard "*If non-nil, indent body of function.\nIf the global value is nil, do not indent function bodies.\nIf the global value is t, always indent function bodies.\nIf the global value is 'guess, then the local value will be set to\neither nil or t when the MATLAB mode is started in a buffer based on the\nfile's current indentation.\nIf the global value is 'MathWorks-Standard, then the local value is not\nchanged, and functions are indented based on `matlab-functions-have-end'." (choice (const :tag "Always" t) (const :tag "Never" nil) (const :tag "Guess" guess) (const :tag "MathWorks Standard" MathWorks-Standard)) make-variable-buffer-local put safe-local-variable symbolp matlab-functions-have-end 'guess "*If non-nil, functions-have-end minor mode is on by default.\nIf the value is 'guess, then we guess if a file has end when\n`matlab-mode' is initialized."] 8) #@48 Toggle `matlab-functions-have-end-minor-mode'. (defalias 'matlab-toggle-functions-have-end #[nil "\300 \207" [matlab-toggle-functions-have-end-minor-mode] 1 (#$ . 5227) nil]) #@141 Non-nil if Matlab-Functions-Have-End minor mode is enabled. Use the command `matlab-functions-have-end-minor-mode' to change this variable. (defvar matlab-functions-have-end-minor-mode nil (#$ . 5409)) (make-variable-buffer-local 'matlab-functions-have-end-minor-mode) #@648 Toggle functions-have-end minor mode, indicating function/end pairing. This is a minor mode. If called interactively, toggle the `Matlab-Functions-Have-End minor mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `matlab-functions-have-end-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (defalias 'matlab-functions-have-end-minor-mode #[(&optional arg) "\306  \307=\203\n?\202 \247\203 \310W\203\311\202\312\313\303!\2032\314\302 \"\n\2032\302 B\315 \n\203I\f\316=\203D\317\202K\f\202K\311 \317=\204Y \320=\204Y \210)\321\322\n\203d\323\202e\324\"\210\325\326!\203\214\306 \203y\306 \232\203\214\327\330\331\n\203\206\332\202\207\333#\210))\334 \210\n\207" [#1=#:last-message arg matlab-functions-have-end-minor-mode local-minor-modes type matlab-functions-have-end current-message toggle 1 nil t boundp delq matlab-guess-script-type empty guess class run-hooks matlab-functions-have-end-minor-mode-hook matlab-functions-have-end-minor-mode-on-hook matlab-functions-have-end-minor-mode-off-hook called-interactively-p any " in current buffer" message "Matlab-Functions-Have-End minor mode %sabled%s" "en" "dis" force-mode-line-update local] 4 (#$ . 5685) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar matlab-functions-have-end-minor-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\314\300!\205#\310\211%\207" [matlab-functions-have-end-minor-mode-map matlab-functions-have-end-minor-mode-hook variable-documentation put "Hook run after entering or leaving `matlab-functions-have-end-minor-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode matlab-functions-have-end-minor-mode (:eval (cond ((eq matlab-functions-have-end 'guess) " function... ?") ((eq matlab-functions-have-end 'class) " classdef...end") (matlab-functions-have-end " function...end") (t " function..."))) boundp] 6) #@56 The last time we guessed the script type, what was it? (defvar matlab-last-script-type-guess nil (#$ . 8126)) #@74 Return non-nil if our last guess at a script type was function or class. (defalias 'matlab-last-guess-decl-p #[nil "\301>\207" [matlab-last-script-type-guess #'class] 2 (#$ . 8242)]) #@111 Guess the type of script this `matlab-mode' file contains. Returns one of 'empty, 'script, 'function, 'class. (defalias 'matlab-guess-script-type #[nil "\212eb\210\304\305 \204\306\202L\307\310!\211\203K\211\211@)\311=\205( 8\312=)\203K\313!\211\314\230\203:\315\202G\n\316\230\203D\317\202G\320\321!)\202L\322*\211\207" [lvl1 mlf-stype str matlab-last-script-type-guess nil matlab-find-code-line empty matlab-compute-line-context 1 block-start decl matlab-line-first-word-text "function" function "classdef" class error "Error in script guessing algorithm." script] 3 (#$ . 8433)]) #@197 Look at the contents of the current buffer and decide if functions have end. If the current value of `matlab-functions-have-end' is 'guess, look @ the buffer. If the value is t, then return that. (defalias 'matlab-do-functions-have-end-p #[(&optional no-navigate) "\304=\203b\305 \211\306\267\202\304\202`\307\202`\310\202`\n\203#\304\202`\212eb\210\311 \210\312\313 \210\314`!\315 8\206<\316 8)?\205S\317\320\212\321\322!\210`)\212\323\322!\210`)\"!\324=\205_\325 ?\205_\312*)\207\207" [matlab-functions-have-end type no-navigate pps guess matlab-guess-script-type #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (empty 15 script 19 class 23)) script class matlab-find-code-line t back-to-indentation syntax-ppss 8 9 matlab-keyword-p buffer-substring-no-properties skip-syntax-backward "w_" skip-syntax-forward decl matlab--scan-block-forward] 6 (#$ . 9043)]) #@79 Toggle `matlab-functions-have-end-minor-mode' only for `matlab-mode' buffers. (defalias 'matlab-toggle-functions-have-end-minor-mode #[nil "\300 \210\205 \302=?\205\300\303!\210\304\305!\207" [matlab-functions-have-end-minor-mode major-mode matlab-mode -1 error "Mode `matlab-functions-have-end' minor mode is only for MATLAB Major mode"] 2 (#$ . 9964)]) #@87 Non-nil if functions bodies are indented. See `matlab-indent-function-body' variable. (defalias 'matlab-indent-function-body-p #[nil "\302=\203 \207\207" [matlab-indent-function-body matlab-functions-have-end MathWorks-Standard] 2 (#$ . 10330)]) #@116 Look at the current buffer and determine if functions are indented. Setup various variables based on what we find. (defalias 'matlab-guess-function-indentation #[nil "\302 \211\303=\204\304\211\202J\305\306!\307=\203\307\211\202J\212eb\210\310 \210\311 \210\310 \210\312 \313V\203?\305\306!\203;\304\202G\306\202G\305\306!?\205G\304\211))\207" [st matlab-indent-function-body matlab-guess-script-type function MathWorks-Standard matlab-do-functions-have-end-p t guess matlab-find-code-line matlab-scan-end-of-command current-indentation 0] 3 (#$ . 10587)]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\210\300\313\314\315\304\305\306\316&\210\300\317\320\321\304\305\306\322&\210\300\323\324\325\304\305\306\322&\210\300\326\324\327\304\305\306\322&\210\300\330\331\332\304\305\306\307&\210\300\333\334\335\304\305\306\307&\210\300\336\337\340\304\305\306\316&\210\300\341\337\342\304\305\306\316&\210\300\343\344\345\304\305\306\316&\210\300\346\324\347\304\305\306\322&\210\300\350\351\352\304\305\306\353&\210\300\354\355\356\304\305\306\307&\210\300\357\320\360\304\305\306\361&\210\300\362\320\363\304\305\306\322&\210\364\362!\210\365\362\366\367#\210\300\370\320\371\304\305\306\322&\210\364\370!\210\365\370\366\367#\210\300\372\320\373\304\305\306\322&\210\364\372!\210\300\374\320\375\304\305\306\322&\210\364\374!\207" [custom-declare-variable matlab-fill-fudge 10 "Number of characters around `fill-column' we can fudge filling.\nBasically, there are places that are very convenient to fill at, but\nmight not be the closest fill spot, or occur after `fill-column'.\nIf they occur within this fudge factor, we will use them.\nAlso, if none of the above occur, and we find a symbol to break at,\nbut an open paren (group) starts or ends within this fudge factor,\nmove there to boost the amount of fill leverage we can get." :group matlab :type integer matlab-fill-fudge-hard-maximum 79 "The longest line allowed when auto-filling code.\nThis overcomes situations where the `fill-column' plus the\n`matlab-fill-fudge' is greater than some hard desired limit." matlab-elipsis-string "..." "Text used to perform continuation on code lines.\nThis is used to generate and identify continuation lines." string matlab-fill-code nil "*If true, `auto-fill-mode' causes code lines to be automatically continued." boolean matlab-fill-count-ellipsis-flag t "*Non-nil means to count the ellipsis when auto filling.\nThis effectively shortens the `fill-column' by the length of\n`matlab-elipsis-string'." matlab-fill-strings-flag "*Non-nil means that when auto-fill is on, strings are broken across lines.\nIf `matlab-fill-count-ellipsis-flag' is non nil, this shortens the\n`fill-column' by the length of `matlab-elipsis-string'." matlab-comment-column 40 "*The goal comment column in `matlab-mode' buffers." matlab-comment-anti-indent 0 "*Amount of anti-indentation to use for comments in relation to code." matlab-comment-line-s "% " "*String to start comment on line by itself." matlab-comment-on-line-s "*String to start comment on line with code." matlab-comment-region-s "% $$$ " "*String inserted by \\[matlab-comment-region] at start of each line in region." matlab-verify-on-save-flag "*Non-nil means to verify M whenever we save a file." matlab-mode-verify-fix-functions '(matlab-mode-vf-functionname matlab-mode-vf-classname matlab-mode-vf-add-ends) "List of function symbols which perform a verification and fix to M code.\nEach function gets no arguments, and returns nothing. They can move\npoint, but it will be restored for them." (repeat (choice :tag "Function: " '(matlab-mode-vf-functionname matlab-mode-vf-classname matlab-mode-vf-add-ends matlab-mode-vf-quiesce-buffer))) matlab-block-verify-max-buffer-size 50000 "*Largest buffer size allowed for block verification during save." matlab-mode-hook "*List of functions to call on entry to MATLAB mode." hook matlab-show-mlint-warnings "*If non-nil, show mlint warnings." make-variable-buffer-local put safe-local-variable booleanp matlab-highlight-cross-function-variables "*If non-nil, highlight cross-function variables." matlab-return-add-semicolon "*If non nil, check to see a semicolon is needed when RET is pressed." matlab-change-current-directory "*If non nil, make file's directory the current directory when evaluating it."] 8) #@49 The abbrev table used in `matlab-mode' buffers. (defvar matlab-mode-abbrev-table nil (#$ . 14973)) (define-abbrev-table 'matlab-mode-abbrev-table nil) #@61 The help key map for `matlab-mode' and `matlab-shell-mode'. (defvar matlab-help-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210)\207" [km make-sparse-keymap define-key "r" matlab-shell-run-command "f" matlab-shell-describe-command "a" matlab-shell-apropos "v" matlab-shell-describe-variable] 4) (#$ . 15130)) #@35 The keymap used in `matlab-mode'. (defvar matlab-mode-map (byte-code "\303 \304\305\306#\210\304\307\310#\210\304\311\312#\210\304\313\314#\210\304\315\316#\210\304\317\320#\210\304\321\322#\210\304\323\322#\210\304\324\325#\210\304\326\325#\210\304\327\330#\210\304\331\332#\210\304\333\334#\210\304\335\336#\210\304\337\340#\210\341\342\330 $\210\304\343\344#\210\304\345\346#\210\304\347\350#\210\304\351\352#\210\304\353\354#\210\304\355\356#\210\304\357\360#\210\304\361\n#\210\304\362\363#\210\304\364\365#\210\341\366\367 $\210)\207" [km global-map matlab-help-map make-sparse-keymap define-key [(meta a)] matlab-beginning-of-command [(meta e)] matlab-end-of-command [(control c) (control c)] matlab-insert-map-fcn [(control c) (control f)] matlab-fill-comment-line [(control c) (control j)] matlab-justify-line [(control c) (control q)] matlab-fill-region "%" matlab-electric-comment "^" "}" matlab-electric-block-comment "{" ";" matlab-comment-region ":" matlab-uncomment-region [(meta \;)] matlab-comment [(meta j)] matlab-comment-line-break-function [(control c) return] matlab-comment-return substitute-key-definition comment-region "\211" matlab-complete-symbol [(control c) (control s)] matlab-shell-save-and-go [(control c) (control r)] matlab-shell-run-region [(meta control return)] matlab-shell-run-cell [(control return)] matlab-shell-run-region-or-line [(control c) (control t)] matlab-show-line-info [(control c) 46] matlab-shell-locate-fcn [(control h) (control m)] [(meta s)] matlab-show-matlab-shell-buffer [(control meta mouse-2)] matlab-find-file-click read-only-mode matlab-toggle-read-only] 5) (#$ . 15493)) #@47 Keymap used in MATLAB mode to provide a menu. (defvar matlab-mode-menu-keymap nil (#$ . 17166)) #@13 MATLAB menu (defvar matlab-mode-menu nil (#$ . 17268)) (byte-code "\302\301\303\304$\210\305 \"\210\306\307\310\311\312\313%\207" [matlab-mode-map matlab-mode-menu easy-menu-do-define "MATLAB menu" ("MATLAB" ["Start MATLAB" matlab-shell :active (not (matlab-shell-active-p)) :visible (not (matlab-shell-active-p))] ["Switch to MATLAB" matlab-shell :active (matlab-any-shell-active-p) :visible (matlab-any-shell-active-p)] ["Save and go" matlab-shell-save-and-go :active (matlab-any-shell-active-p)] ["Run Region" matlab-shell-run-region :active (matlab-any-shell-active-p)] ["Run Cell" matlab-shell-run-cell :active (matlab-any-shell-active-p)] ["Version" matlab-show-version t] "----" ["Locate MATLAB function" matlab-shell-locate-fcn :active (matlab-shell-active-p) :help "Run 'which FCN' in matlab-shell, then open the file in Emacs"] ["Show M-Lint Warnings" matlab-toggle-show-mlint-warnings :active (and (locate-library "mlint") (fboundp 'mlint-minor-mode)) :style toggle :selected matlab-show-mlint-warnings] ("Auto Fix" ["Verify/Fix source" matlab-mode-verify-fix-file t] ["Spell check strings and comments" matlab-ispell-strings-and-comments t] ["Quiesce source" matlab-mode-vf-quiesce-buffer t]) ("Format" ["Justify Line" matlab-justify-line t] ["Fill Region" matlab-fill-region t] ["Fill Comment Paragraph" matlab-fill-paragraph (save-excursion (matlab-comment-on-line))] ["Join Comment" matlab-join-comment-lines (save-excursion (matlab-comment-on-line))] ["Comment Region" matlab-comment-region t] ["Uncomment Region" matlab-uncomment-region t]) ("Debug" ["Edit File (toggle read-only)" matlab-shell-gud-mode-edit :help "Exit MATLAB debug minor mode to edit without exiting MATLAB's K>> prompt." :visible gud-matlab-debug-active] ["Add Breakpoint (ebstop in FILE at point)" gud-break :active (matlab-shell-active-p) :help "When MATLAB debugger is active, set break point at current M-file point"] ["Remove Breakpoint (ebclear in FILE at point)" gud-remove :active (matlab-shell-active-p) :help "Show all active breakpoints in a separate buffer."] ["List Breakpoints (ebstatus)" gud-list-breakpoints :active (matlab-shell-active-p) :help "List active breakpoints."] ["Step (dbstep in)" gud-step :active gud-matlab-debug-active :help "When MATLAB debugger is active, step into line"] ["Next (dbstep)" gud-next :active gud-matlab-debug-active :help "When MATLAB debugger is active, step one line"] ["Finish function (dbstep out)" gud-finish :active gud-matlab-debug-active :help "When MATLAB debugger is active, run to end of function"] ["Continue (dbcont)" gud-cont :active gud-matlab-debug-active :help "When MATLAB debugger is active, run to next break point or finish"] ["Evaluate Expression" matlab-shell-gud-show-symbol-value :active (matlab-any-shell-active-p) :help "When MATLAB is active, show value of the symbol under point."] ["Show Stack" mlg-show-stack :active gud-matlab-debug-active :help "When MATLAB debugger is active, show the stack in a buffer."] ["Quit debugging (dbquit)" gud-stop-subjob :active gud-matlab-debug-active :help "When MATLAB debugger is active, stop debugging"]) ("Customize" ["Indent Function Body" (setq matlab-indent-function-body (not (matlab-indent-function-body-p))) :style toggle :selected matlab-indent-function-body] ["Functions Have end" matlab-toggle-functions-have-end :style toggle :selected matlab-functions-have-end] ["Verify File on Save" (setq matlab-verify-on-save-flag (not matlab-verify-on-save-flag)) :style toggle :selected matlab-verify-on-save-flag] ["Auto Fill does Code" (setq matlab-fill-code (not matlab-fill-code)) :style toggle :selected matlab-fill-code] ["Highlight Cross-Function Variables" matlab-toggle-highlight-cross-function-variables :active (locate-library "mlint") :style toggle :selected matlab-highlight-cross-function-variables] ["Add Needed Semicolon on RET" (setq matlab-return-add-semicolon (not matlab-return-add-semicolon)) :style toggle :selected matlab-return-add-semicolon] ["Customize" (customize-group 'matlab) (and (featurep 'custom) (fboundp 'custom-declare-variable))]) "----" ["Run M Command" matlab-shell-run-command (matlab-shell-active-p)] ["Describe Command" matlab-shell-describe-command (matlab-shell-active-p)] ["Describe Variable" matlab-shell-describe-variable (matlab-shell-active-p)] ["Command Apropos" matlab-shell-apropos (matlab-shell-active-p)]) easy-menu-add custom-declare-face matlab-region-face ((t :inherit region)) "*Face used to highlight a matlab region." :group matlab] 6) #@46 Self reference for unterminated string face. (defvar matlab-unterminated-string-face 'matlab-unterminated-string-face (#$ . 21778)) #@46 Self reference for command dual string face. (defvar matlab-commanddual-string-face 'matlab-commanddual-string-face (#$ . 21916)) #@39 Self reference for simulink keywords. (defvar matlab-simulink-keyword-face 'matlab-simulink-keyword-face (#$ . 22052)) #@50 Self reference for nested function/end keywords. (defvar matlab-nested-function-keyword-face 'matlab-nested-function-keyword-face (#$ . 22177)) #@46 Self reference for cross-function variables. (defvar matlab-cross-function-variable-face 'matlab-cross-function-variable-face (#$ . 22327)) #@32 Self reference for cellbreaks. (defvar matlab-cellbreak-face 'matlab-cellbreak-face (#$ . 22473)) #@26 Self reference for math. (defvar matlab-math-face 'matlab-math-face (#$ . 22577)) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\304\305%\210\300\311\312\313\304\305%\210\300\314\315\316#\210\300\317\320\316\304\305%\210\300\321\322\323#\210\300\324\325\326#\210\300\327\330\323#\210\300\331\332\323#\207" [custom-declare-face matlab-unterminated-string-face ((t :inherit font-lock-string-face :underline t)) "*Face used to highlight unterminated strings." :group matlab matlab-commanddual-string-face ((t :inherit font-lock-string-face :slant italic)) "*Face used to highlight command dual string equivalent." matlab-simulink-keyword-face ((t :inherit font-lock-builtin-face :underline t)) "*Face used to highlight simulink specific functions." matlab-nested-function-keyword-face ((t :inherit font-lock-keyword-face :slant italic)) "*Face to use for cross-function variables." matlab-cross-function-variable-face ((t :weight bold :slant italic)) matlab-cellbreak-face ((t :inherit font-lock-comment-face :overline t :bold t)) "*Face to use for cellbreak %% lines." matlab-ignored-comment-face ((t :inherit font-lock-comment-face :slant italic)) "*Face to use for ignored comments.\nIgnored comments are lines that start with '% $$$' or '%^'." matlab-pragma-face ((t :inherit font-lock-comment-face :bold t)) matlab-math-face ((t :inherit font-lock-constant-face :slant italic))] 6) #@104 Find next nested function/end keyword for font-lock. Argument LIMIT is the maximum distance to search. (defalias 'matlab-font-lock-nested-function-keyword-match #[(limit) "\3052d`\306\211\nW\203a\307 !\211\203Y@\310 \311\"\203Q \312 !U\2036 b\210\313\305\314\315 \316\\\317#\"\210\320 !\321Z \fX\203P\fb\210\313\305\314\322\f\321\\\317#\"\210))A\211\204\323 !\211\202 *\3060\207" [overlays pos limit overlay end-of-overlay result nil matlab-overlays-at matlab-overlay-get nested-function matlab-overlay-start throw re-search-forward "function" 8 t matlab-overlay-end 3 "end" matlab-next-overlay-change] 7 (#$ . 23980)]) #@100 Find next cross-function variable for font-lock. Argument LIMIT is the maximum distance to search. (defalias 'matlab-font-lock-cross-function-variables-match #[(limit) "\3052N`\306\211\211 W\203K\307\n!\211\203B @\310\f\311\"\211\203:\nb\210 \312\f!^\313\n\314#\203:\315\305\314\"\210) A\211\204)\316\n!\211\202 +\3060\207" [variables overlays pos limit overlay result nil matlab-overlays-at matlab-overlay-get cross-function-variables matlab-overlay-end re-search-forward t throw matlab-next-overlay-change] 5 (#$ . 24625)]) (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&\207" [custom-declare-variable matlab-hg-primitives-list '("figure" "axes" "line" "surface" "patch" "text" "light" "image" "imagesc" "rectangle" "animatedline" "set" "get" "reset" "copyobj" "findobj" "cla" "clf" "shg" "axis" "hold" "title" "xlabel" "ylabel" "zlabel" "xlim" "ylim" "zlim" "rlim" "thetalim" "lighting" "shading" "material" "plot" "plot3" "semilogx" "semilogy" "loglog" "scatter" "scatter3" "stackedplot" "area" "errorbar" "bubblechart" "bubblechart3" "swarmchart" "swarmchart3" "spy" "histogram" "histogram2" "wordcloud" "bubblecloud" "heatmap" "parallelplot" "bar" "barh" "bar3" "bar3h" "stem" "stairs" "quiver" "quiver3" "stem3" "contour" "contourf" "contour3" "contourslice" "fcontour" "surf" "surfc" "surfl" "ribbon" "pcolor" "mesh" "meshc" "meshz" "waterfall" "comet" "comet3" "polarplot" "polarscatter" "polarhistogram" "polarbubblechart" "goeplot" "geoscatter" "geobubble" "geodensity" "fplot" "fplot3" "fimplicit" "fsurf" "fimplicit3" "legend" "colorbar" "tiledlayout" "nexttile" "subplot" "annotation" "uicontrol" "uimenu" "uitoolbar" "uitoggletool" "uipushtool" "uicontext" "uicontextmenu" "uisetfont" "uisetcolor" "uigetfile" "uiputfile") "List of handle graphics functions used in highlighting.\nCustomizing this variable is only useful if `regexp-opt' is available." :group matlab :type (repeat (string :tag "HG Keyword: ")) matlab-debug-list '("dbstop" "dbclear" "dbcont" "dbdown" "dbmex" "dbstack" "dbstatus" "dbstep" "dbtype" "dbup" "dbquit") "List of debug commands used in highlighting.\nCustomizing this variable is only useful if `regexp-opt' is available." (repeat (string :tag "Debug Keyword: ")) matlab-simulink-keywords '("simulink" "get_param" "set_param" "simget" "simset" "sim" "new_system" "open_system" "close_system" "save_system" "find_system" "add_block" "delete_block" "replace_block" "add_line" "delete_line" "replace_line" "bdroot" "bdclose") "List of keywords to highlight for simulink." (repeat (string :tag "Debug Keyword: ")) matlab-constants-keyword-list '("eps" "pi" "flintmax" "inf" "Inf" "nan" "NaN" "ans" "i" "j" "NaT" "true" "false") "List of constants and special variables in MATLAB." (repeat (string :tag "Debug Keyword: "))] 8) #@139 Create a font-lock usable KEYWORDLIST matching regular expression. Uses `regex-opt' if available. Otherwise creates a 'dumb' expression. (defalias 'matlab-font-lock-regexp-opt #[(keywordlist) "\301\302\303!\203 \303!\202\304\305\306#\307Q\207" [keywordlist "\\_<\\(" fboundp regexp-opt mapconcat #[(s) "\207" [s] 1] "\\|" "\\)\\_>"] 5 (#$ . 27528)]) #@95 Font lock matcher for basic keywords. Fails to match when keywords show up as variables, etc. (defalias 'matlab-font-lock-basic-keyword-match #[(limit) "\301\302\"\207" [limit matlab--scan-next-keyword fl-simple] 3 (#$ . 27891)]) #@94 Font lock matcher for mcos keywords. Fails to match when keywords show up as variables, etc. (defalias 'matlab-font-lock-vardecl-keyword-match #[(limit) "\301\302\"\207" [limit matlab--scan-next-keyword vardecl] 3 (#$ . 28128)]) (defvar matlab-fl-anchor-keyword nil) #@94 Font lock matcher for mcos keywords. Fails to match when keywords show up as variables, etc. (defalias 'matlab-font-lock-mcos-keyword-match #[(limit) "\304=\205 \305\306 \"\211\205 \307 \310\216\311\312!\203\313\314!\210*\315\207" [matlab-functions-have-end limit matlab-fl-anchor-keyword save-match-data-internal class matlab--scan-next-keyword mcos match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] looking-at "\\s-*(" forward-sexp 1 t] 3 (#$ . 28402)]) #@94 Font lock matcher for mcos keywords. Fails to match when keywords show up as variables, etc. (defalias 'matlab-font-lock-args-keyword-match #[(limit) "\302\303\"\211\207" [limit matlab-fl-anchor-keyword matlab--scan-next-keyword args] 3 (#$ . 28911)]) #@154 Called by font-lock to extend the region for multiline expressions. Supports expressions like arguments and property blocks with anchored color support. (defalias 'matlab-font-lock-extend-region #[nil "\212\n\306\307 !\211?\205:\212\310\311!\210`)\212\312\311!\210`)\313 \"\314!\211\2059 F,\211A@\315\235\203]\316!\203]\317 ^\320\321\322 \"\204]\n\323 ] =\205f\n =?\205k\324-\207" [font-lock-beg flb font-lock-end fle tmp start matlab--scan-block-backward-up window-start skip-syntax-backward "w_" skip-syntax-forward buffer-substring-no-properties matlab-keyword-p ("properties" "events" "arguments") matlab--valid-keyword-node point-at-bol matlab--scan-next-keyword all window-end point-at-eol t end txt type blockmatch] 5 (#$ . 29172)]) (defvar ml-fl-anchor-limit nil) #@42 Set the end limit for anchored matchers. (defalias 'matlab-font-lock-anchor-set-end-limit #[nil "\212\302 \303\216\304\305d\"\210\306v\210`\211+\207" [save-match-data-internal ml-fl-anchor-limit match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] matlab--scan-next-keyword all -1] 3 (#$ . 29986)]) #@44 Clear the end limit for anchored matchers. (defalias 'matlab-font-lock-anchor-clear-end-limit #[nil "\301\211\207" [ml-fl-anchor-limit nil] 2 (#$ . 30330)]) #@122 After finding a keyword like PROPERTIES or ARGUMENTS, match vars. This matcher will handle a range of variable features. (defalias 'matlab-font-lock-anchor-variable-match #[(limit) "A@\306\235\205B\307\310 \311#\312\224\312\225D\313\314!\211\203$\312\224\312\225D\202+ A@ A@D\315 \211 #\n\205A\316 b\210\317!\210\311-\207" [matlab-fl-anchor-keyword ml-fl-anchor-limit match md1 tm tm1 ("properties" "events" "arguments") re-search-forward "\\(?:^\\|[,;]\\)\\s-+\\(\\(?:\\w+\\|\\.\\)+\\)\\_>" t 1 looking-at "\\(\\(?:\\s-*([^\n)]+)\\s-*\\|\\s-+\\)?\\(?:\\w+\\|\\.\\)*\\)\\s-*\\($\\|[.%{=]\\)" append point-at-eol set-match-data newmdata] 5 (#$ . 30495)]) #@57 Basic Expressions to highlight in MATLAB mode or shell. (defconst matlab-basic-font-lock-keywords (byte-code "\302\303!\304D\303 !\305\306E\307F\207" [matlab-hg-primitives-list matlab-constants-keyword-list (matlab-font-lock-basic-keyword-match (0 font-lock-keyword-face)) matlab-font-lock-regexp-opt (0 font-lock-builtin-face) 1 matlab-math-face ("\\<[0-9]\\.?\\(i\\|j\\)\\_>" 1 font-lock-reference-face)] 5) (#$ . 31168)) #@49 Basic Expressions to highlight in MATLAB Files. (defconst matlab-file-basic-font-lock-keywords (append matlab-basic-font-lock-keywords '((matlab-font-lock-mcos-keyword-match (1 font-lock-keyword-face)) (matlab-font-lock-args-keyword-match (1 font-lock-keyword-face)) (matlab-font-lock-cross-function-variables-match (1 matlab-cross-function-variable-face prepend)) (matlab-font-lock-nested-function-keyword-match (0 matlab-nested-function-keyword-face prepend)))) (#$ . 31599)) (defconst matlab-fl-opt-continuation "\\s<\\S>+\\s>") (defconst matlab-fl-opt-whitespace (concat "\\s-*\\(?:" matlab-fl-opt-continuation "\\)?\\s-*")) (defconst matlab-fl-fcn-key "^\\s-*function\\_>") (defconst matlab-fl-return-args "\\(\\[[^]]*\\]\\|\\sw+\\)") (defconst matlab-fl-fcn-name "\\(?:[sg]et\\.\\)?\\sw+") (defconst matlab-fl-fcn-args "\\(?:(\\|$\\|\\s<\\)") #@52 List of font lock keywords for stuff in functions. (defconst matlab-function-font-lock-keywords (byte-code " \n \306 \307 \310 \f\260 \311\312E \307 \310 \f\260\313D \307\n \306 \314 \315\260 \316 \317R\320\321\322FD\323\324\325\326 \327P\330D\257\207" [matlab-fl-fcn-key matlab-fl-opt-whitespace matlab-fl-return-args matlab-fl-fcn-name matlab-fl-fcn-args matlab-indent-past-arg1-functions "=" "\\(" "\\)" (1 font-lock-variable-name-face append) (2 font-lock-function-name-face prepend) (1 font-lock-function-name-face prepend) "\\)?" "(" "\\(\\sw+\\)" "[,)]" (save-excursion (condition-case nil (matlab-scan-end-of-command) (error (point-at-eol)))) nil (1 font-lock-variable-name-face) (matlab-font-lock-args-keyword-match (matlab-font-lock-anchor-variable-match (matlab-font-lock-anchor-set-end-limit) (matlab-font-lock-anchor-clear-end-limit) (1 font-lock-variable-name-face t) (2 font-lock-type-face t))) (matlab-font-lock-vardecl-keyword-match ("\\(\\w+\\)\\(\\s-*=[^,; \n]+\\|[, ;]+\\|$\\)" nil nil (1 font-lock-variable-name-face))) ("\\<\\(\\(?:par\\)?for\\)\\s-+\\(\\sw+\\)\\s-*=\\s-*\\(\\([^\n,;%(]+\\|([^\n%)]+)\\)+\\)" (1 font-lock-keyword-face) (2 font-lock-variable-name-face append) (3 font-lock-reference-face append)) ("\\_<\\(case\\|switch\\)\\_>\\s-+\\({[^}\n]+}\\|[^,%\n]+\\)" (2 font-lock-reference-face)) "\\s-*" ("(\\s-*\\(\\(?:\\w\\|\\.\\)+\\)\\s-*\\(,\\|)\\)" nil nil (1 font-lock-variable-name-face))] 13) (#$ . 32454)) #@54 Regular expression for matching an attributes block. (defconst matlab-class-attributes-list-re "\\s-*\\(?2:(\\([^)]+\\))\\|\\)" (#$ . 33916)) #@71 List of font-lock keywords used when an MATLAB file contains a class. (defconst matlab-file-class-font-lock-keywords (byte-code "\301\302Q\303D\304\305Q\306D\307\310D\311F\207" [matlab-class-attributes-list-re "^\\s-*\\(classdef\\)\\_>" "\\s-*\\(?3:\\sw+\\)" (3 font-lock-function-name-face) "^\\s-*\\(classdef\\)" "\\s-+\\(\\sw+\\)" ("\\s-*[<&]\\s-*\\(\\(\\sw\\|\\.\\)+\\)" nil nil (1 font-lock-constant-face)) "^\\s-*\\(classdef\\|properties\\|methods\\|events\\|arguments\\)\\s-*(" ("\\(\\sw+\\)\\s-*\\(=\\s-*[^,)]+\\)?" nil nil (1 font-lock-type-face)) (matlab-font-lock-mcos-keyword-match (matlab-font-lock-anchor-variable-match (matlab-font-lock-anchor-set-end-limit) (matlab-font-lock-anchor-clear-end-limit) (1 font-lock-variable-name-face t) (2 font-lock-type-face t)))] 4) (#$ . 34064)) #@42 Expressions to highlight in MATLAB mode. (defconst matlab-file-gaudy-font-lock-keywords (append matlab-basic-font-lock-keywords matlab-file-basic-font-lock-keywords matlab-function-font-lock-keywords matlab-file-class-font-lock-keywords) (#$ . 34869)) #@42 Expressions to highlight in MATLAB mode. (defconst matlab-really-gaudy-font-lock-keywords (byte-code "\304\305\306\307\310Q\311D\307\312Q\313D\307\314Q\315D\316 !\317D\316\n!\320 E\257!\207" [matlab-comment-line-s matlab-debug-list matlab-simulink-keywords matlab-simulink-keyword-face append ("\\([<>~=]=\\|\\.[/\\*^'?]\\|\\_<\\(?:\\\\|[-<>!?^&|*+\\/~:@]\\)" 1 font-lock-builtin-face) ("[]A-Za-z0-9_\"})']\\('+\\)" 1 font-lock-builtin-face) "^" "\\s-*\\(\\([A-Z]+\\s-*=\\s-+\\|\\[[^]]+]\\s-*=\\s-+\\|\\)\\([A-Z][0-9A-Z]+\\)\\(([^)\n]+)\\| \\)\\)" (1 font-lock-reference-face prepend) "\\s-*See also\\s-+" ("\\([A-Z][A-Z0-9]+\\)\\([,.]\\| and\\|$\\) *" nil nil (1 font-lock-reference-face prepend)) "\\s-*\\(\\$Revision[^\n$]+\\$\\)" (1 font-lock-reference-face prepend) matlab-font-lock-regexp-opt (0 'bold) 1] 10) (#$ . 35127)) #@42 Expressions to highlight in MATLAB mode. (defconst matlab-file-really-gaudy-font-lock-keywords (append matlab-file-gaudy-font-lock-keywords matlab-really-gaudy-font-lock-keywords) (#$ . 35997)) #@61 Expressions which find function headings in MATLAB M files. (defvar matlab-imenu-generic-expression '((nil "^\\s-*function\\>[ \n.]*\\(\\(\\[[^]]*\\]\\|\\sw+\\)[ \n.]*< =[ \n.]*\\)?\\([a-zA-Z0-9_]+\\)" 3)) (#$ . 36197)) #@150 Enter `matlab-mode' when file content looks like a MATLAB *.m file or for empty files *.m files when `matlab-mode-for-new-mfiles' indicates as such. (defalias 'matlab-is-matlab-file #[nil "\205d\306\307\310\311\301!\203 \203 \312H\202!\"\205d\313\314!\204)\313\315!\206d\316 \312U\205d\n\317=\206d\n\320=\205d\321 \322\211\203br\f@q\210 \323=\204V \324=\203Z\317\322)\fA\211\204E *\207" [buffer-file-name archive-subfile-mode matlab-mode-for-new-mfiles enter-matlab-mode buffers major-mode string-match "^\\(?:.*/\\)?[a-zA-Z][a-zA-Z0-9_]*\\.m\\'" file-name-sans-versions boundp 0 looking-at "^[[:space:]\n]*\\(//\\|/\\*\\|#\\|@\\)" "^[[:space:]\n]*[^[:space:]\n]" buffer-size t maybe buffer-list nil matlab-mode matlab-shell-mode] 6 (#$ . 36427)]) (add-to-list 'magic-mode-alist '(matlab-is-matlab-file . matlab-mode)) #@57 When leaving `matlab-mode', turn off `mlint-minor-mode' (defalias 'matlab-mode-leave #[nil "\301=\205\f\302\303!\210\304 \207" [major-mode matlab-mode mlint-minor-mode -1 matlab-scan-disable] 2 (#$ . 37276)]) (defvar matlab-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [matlab-mode-hook variable-documentation put "Hook run after entering MATLAB mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp matlab-mode-map definition-name matlab-mode] 4) (defvar matlab-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" [matlab-mode-abbrev-table matlab-mode-map variable-documentation put purecopy "Keymap for `matlab-mode'." boundp matlab-mode-syntax-table definition-name matlab-mode (lambda (def-tmp-var) (defvar matlab-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `matlab-mode'." (lambda (def-tmp-var) (defvar matlab-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `matlab-mode'." derived-mode-parent prog-mode] 5) #@2407 MATLAB(R) mode is a major mode for editing MATLAB dot-m files. \ Convenient editing commands are: \[matlab-comment-region] - Comment/Uncomment out a region of code. \[matlab-fill-comment-line] - Fill the current comment line. \[matlab-fill-region] - Fill code and comments in region. \[matlab-complete-symbol] - Symbol completion of matlab symbolsbased on the local syntax. Convenient navigation commands are: \[matlab-beginning-of-command] - Move to the beginning of a command. \[matlab-end-of-command] - Move to the end of a command. Convenient template insertion commands: \[tempo-template-matlab-function] - Insert a function definition. \[tempo-template-matlab-if] - Insert an IF END block. \[tempo-template-matlab-for] - Insert a FOR END block. \[tempo-template-matlab-switch] - Insert a SWITCH END statement. \[matlab-insert-next-case] - Insert the next CASE condition in a SWITCH. \[matlab-insert-end-block] - Insert a matched END statement. With optional ARG, reindent. \[matlab-stringify-region] - Convert plain text in region to a string with correctly quoted chars. Variables: `matlab-indent-level' Level to indent blocks. `matlab-continuation-indent-level' Level to indent after ... continuation `matlab-case-indent-level' Level to unindent case statements. `matlab-indent-past-arg1-functions' Regexp of functions to indent past the first argument on continuation lines. `matlab-maximum-indents' List of maximum indents during lineups. `matlab-comment-column' Goal column for on-line comments. `fill-column' Column used in auto-fill. `matlab-indent-function-body' If non-nil, indents body of MATLAB functions. `matlab-functions-have-end' If non-nil, MATLAB functions terminate with end. `matlab-fill-code' Non-nil, auto-fill code in auto-fill-mode. `matlab-fill-strings' Non-nil, auto-fill strings in auto-fill-mode. `matlab-verify-on-save-flag' Non-nil, enable code checks on save. `matlab-vers-on-startup' If t, show version on start-up. `matlab-handle-simulink' If t, enable simulink keyword highlighting. All Key Bindings: \{matlab-mode-map} In addition to any hooks its parent mode `prog-mode' might have run, this mode runs the hook `matlab-mode-hook', as the final or penultimate step during initialization. (defalias 'matlab-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@A=\204V\326@\325AC#\210\327 !\210\330\f!\210@A\331 \210\327 !\210\311\312\332\333!\203\206\311>\203\200\210\202\206\311B@A\334 \210\335 \210\336B\306\337!\210\340\306\341!\210\342!\306\343!\210C#\306\344!\210\345$\306\346!\210\347&\306\350!\210\351(\306\352!\210\353*\306\354!\210\355,\306\356!\210\357.\306\360!\210\3610\306\362!\210D2\306\363!\210\3643\306\365!\210\306\366!\210E6\306\367!\210\370\367\371\"\210\306\372!\210\306\373!\210\374;\375F\376\377\201J\307#\210\306\201G!\210\201KG\201L \2031\201M\201N!\210\2029\201M\201O!\210H\201P=\204PH\201Q=\203P\201R \210\370\201S\201T\"\210)\201UIBI\201V\201W!\207" [delay-mode-hooks major-mode mode-name matlab-mode-map matlab-mode-syntax-table parent make-local-variable t prog-mode matlab-mode "MATLAB" 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 kill-all-local-variables boundp whitespace-modes matlab-syntax-setup matlab-scan-setup nil indent-line-function matlab-indent-line indent-region-function matlab-indent-region comment-column comment-indent-function #[nil "\300\207" [nil] 1] electric-indent-functions matlab-electric-indent-function forward-sexp-function matlab-forward-sexp-fcn beginning-of-defun-function matlab-beginning-of-defun end-of-defun-function matlab-skip-over-defun add-log-current-defun-function matlab-add-log-current-defun normal-auto-fill-function matlab-auto-fill fill-column fill-paragraph-function matlab-fill-paragraph fill-prefix imenu-generic-expression write-contents-functions add-hook matlab-mode-verify-fix-file-fn matlab-shell-save-and-go-history font-lock-defaults ((matlab-file-font-lock-keywords matlab-file-gaudy-font-lock-keywords matlab-file-really-gaudy-font-lock-keywords) nil nil ((95 . "w"))) undecided add-to-list font-lock-extend-region-functions matlab-mode-abbrev-table local-abbrev-table indent-tabs-mode matlab-comment-column matlab-fill-column matlab-imenu-generic-expression font-lock-multiline show-paren-data-function matlab-indent-function-body delayed-after-hook-functions matlab-font-lock-extend-region matlab-show-paren-or-block matlab-do-functions-have-end-p matlab-functions-have-end-minor-mode 1 -1 MathWorks-Standard guess matlab-guess-function-indentation change-major-mode-hook matlab-mode-leave #[nil "\300 \207" [matlab-mode-init-mlint-if-needed] 1] run-mode-hooks matlab-mode-hook] 6 (#$ . 38652) nil]) #@62 Check if we should start `mlint-minor-mode' for this buffer. (defalias 'matlab-mode-init-mlint-if-needed #[nil "\303\300!\203 ?\205* \204\n\205*\3041(\300 \204 \n\203$\305\202%\306!0\207\210\307\207" [mlint-minor-mode matlab-show-mlint-warnings matlab-highlight-cross-function-variables boundp (error) 1 0 nil] 2 (#$ . 43834)]) (defvar gud-matlab-debug-active nil) #@223 Toggle read-only bit in MATLAB mode. This looks to see if we are currently debugging, and if so re-enable our debugging feature. Optional argument ARG specifies if the read-only mode should be set. INTERACTIVE is ignored. (defalias 'matlab-toggle-read-only #[(&optional arg interactive) "\301\302!\203\203\303\304!\207\305\306!\207" [gud-matlab-debug-active featurep matlab-shell-gud matlab-shell-gud-minor-mode 1 call-interactively read-only-mode] 2 (#$ . 44216) "P"]) #@44 Show the version number in the minibuffer. (defalias 'matlab-show-version #[nil "\301\302\"\207" [matlab-mode-version message "matlab-mode, version %s"] 3 (#$ . 44697) nil]) #@148 Walk forwards until we are on a line of code return t on success. If the currnet line is code, return immediately. Ignore comments and whitespace. (defalias 'matlab-find-code-line #[nil "\300\301!\210m?\207" [forward-comment 100000] 2 (#$ . 44879)]) #@171 When this is set to non-nil, then forward/backward sexp stops off screen. This is so the block highlighter doesn't gobble up lots of time when a block is not terminated. (defvar matlab-scan-on-screen-only nil (#$ . 45136)) #@250 Go backwards one balanced set of MATLAB expressions. If optional AUTOEND, then pretend we are at an end. If optional NOERROR, then we return t on success, and nil on failure. This assumes that expressions do not cross "function" at the left margin. (defalias 'matlab-backward-sexp #[(&optional autoend noerror) "`\306\307\212\310\311!\210 \203%\312\307!\203\324\f\203\307\202\324\313\314!\210\202\324\315\316!\211\211@)\317=\2057 8)\320=\203d\321 \210\307!\322`!\"\323\"8\205V\323\"8b\210\306!\203_\324\325!\210*\210\202\324\322`!\"\323\"8\206t\326\"8)?\205\213\327\330\212\310\331!\210`)\212\332\331!\210`)\"!\211\203\226\333>\203\245\334#\307$\335#!*\210\202\324\336>\203\301\312\307!\203\324\f\203\272\307\202\324\313\314!\210\202\324\337\307!\203\324\f\203\320\307\202\324\313\314!\210 \203\332`)\nb\210 +\207" [keyword returnme p autoend noerror lvl1 t nil skip-syntax-backward " .><" matlab--scan-block-backward-up error "Unstarted END" matlab-compute-line-context 1 comment block-end beginning-of-line syntax-ppss 8 forward-comment -100000 9 matlab-keyword-p buffer-substring-no-properties "w_" skip-syntax-forward (decl ctrl mcos arg vardecl keyword) -1 forward-sexp (mid case) matlab--scan-block-backward mlf-stype all-comments pps count forward-sexp-function] 6 (#$ . 45366)]) #@149 Function used as `forward-sexp-function' for MATLAB mode. Adapt to use `matlab-forward-sexp' or `matlab-backward-sexp' depending on value of 'arg'. (defalias 'matlab-forward-sexp-fcn #[(&optional arg) "\301V\203\302 \210S\211\202\301W\205 \303 \210T\211\202\207" [arg 0 matlab-forward-sexp matlab-backward-sexp] 3 (#$ . 46710)]) #@251 Go forward one balanced set of MATLAB expressions. If AUTOSTART is non-nil, assume we are already inside a block, and navigate forward until we exit that block. PARENTBLOCK is used when recursing to validate block starts as being in a valid context. (defalias 'matlab-forward-sexp #[(&optional autostart parentblock) "\306\211\212\307\310!\210\n\203\311\306!\203\207\312\313!\210\202\207\n\204.\314\315!\203.\316\225b\210\317 \210\202\207\320`!\321 8\206;\322 8)?\205R\323\324\212\325\326!\210`)\212\307\326!\210`)\"!\211\203]\327>\203i\330\306\331\f!*\210\202\207\332>\203|\311\306!\203\207\312\313!\210\202\207\333\306\211\"\203\207\312\313!\210`) b*\207" [keyword p autostart pps count forward-sexp-function nil skip-syntax-forward " .><" matlab--scan-block-forward-up error "Unterminated Block" looking-at "%" 0 matlab-end-of-string-or-comment syntax-ppss 8 9 matlab-keyword-p buffer-substring-no-properties skip-syntax-backward "w_" (end vardecl keyword) 1 forward-sexp (mid case) matlab--scan-block-forward] 5 (#$ . 47059)]) #@95 Go to the beginning of the current function. With optional ARG, go backward that many defuns. (defalias 'matlab-beginning-of-defun #[(&optional arg) "\204\303\304\305V\203\306 S\211\202 \305W\203Z\307`!\310\n8\206+\311\n8)?\205B\312\313\212\314\315!\210`)\212\316\315!\210`)\"!\317=\203N\320 ?\202S\321\317d\"T\211\202 )\207" [arg ans pps 1 nil 0 matlab--beginning-of-defun-raw syntax-ppss 8 9 matlab-keyword-p buffer-substring-no-properties skip-syntax-backward "w_" skip-syntax-forward decl matlab--scan-block-forward matlab--scan-next-keyword] 6 (#$ . 48121) "p"]) #@110 Assigned to `end-of-defun-function' for matlab mode. Assume point is on a defun, and if so, skip to the end. (defalias 'matlab-skip-over-defun #[nil "\301\302!\210\303`!\3048\206\3058)?\205(\306\307\212\310\311!\210`)\212\301\311!\210`)\"!\312=\2030\313 \207\314\315!\207" [pps skip-syntax-forward " >" syntax-ppss 8 9 matlab-keyword-p buffer-substring-no-properties skip-syntax-backward "w_" decl matlab--scan-block-forward matlab-end-of-defun 1] 5 (#$ . 48721)]) #@40 Go to the end of the current function. (defalias 'matlab-end-of-defun #[(&optional arg) "\204\303\304\305V\203{\306\307!\210\310\311!\210\312`!\313\n8\206#\314\n8)?\205:\315\316\212\317\320!\210`)\212\310\320!\210`)\"!\321=\204C\322\321!\210\310\311!\210\312`!\313\n8\206T\314\n8)?\205k\315\316\212\317\320!\210`)\212\310\320!\210`)\"!\321=\205s\323 ?S\211\202 )\207" [arg ans pps 1 nil 0 matlab-end-of-string-or-comment t skip-syntax-forward " " syntax-ppss 8 9 matlab-keyword-p buffer-substring-no-properties skip-syntax-backward "w_" decl matlab--scan-block-backward-up-until matlab--scan-block-forward] 6 (#$ . 49199) "p"]) #@136 Move to the beginning of defun cursor is in. Move up and backwards one defun, our out of current defun. Accounts for nested functions. (defalias 'matlab--beginning-of-defun-raw #[nil "\302\303`!\304 8\205\304 8b\210\302\203\305\306!\210*\210\307\310!\210\303`!\304 8\206-\311 8)?\205D\312\313\212\307\314!\210`)\212\315\314!\210`)\"!\316=\204M\317\320!\207\321 \210\303`!\304 8\206]\311 8)?\205t\312\313\212\307\314!\210`)\212\315\314!\210`)\"!\320=\203{\302\207\317\320!\207" [all-comments pps t syntax-ppss 8 forward-comment -100000 skip-syntax-backward " >" 9 matlab-keyword-p buffer-substring-no-properties "w_" skip-syntax-forward end matlab--scan-block-backward-up-until decl matlab--scan-block-backward] 5 (#$ . 49854)]) #@133 Return a text string represneting the current block. Tries to return the current defun. If not, look for a cell block with a name. (defalias 'matlab-add-log-current-defun #[nil "\300 \206\301 \207" [matlab-current-defun matlab-current-cell] 1 (#$ . 50604)]) #@92 Return the name of the current cell. The name is any text after the %% and any whitespace. (defalias 'matlab-current-cell #[nil "\212\304\305!\210\306\307!\310\211\211@)\311=\205D \211\211@)\311=\205$\n 8)\312=\205D  8)b\210\313\314 w\210`\307\210\315x\210\316`\"+\207" [start lvl1 mlf-stype mlf-point forward-page -1 matlab-compute-line-context 1 nil comment cell-start "% .,*" point-at-eol " *" buffer-substring-no-properties] 4 (#$ . 50871)]) #@42 Return the name of the current function. (defalias 'matlab-current-defun #[nil "\212\300 \210\301 A@)\207" [matlab--beginning-of-defun-raw matlab-line-declaration-name] 1 (#$ . 51339)]) #@68 Go to the beginning of an M command. Travels across continuations. (defalias 'matlab-beginning-of-command #[nil "\300 \207" [matlab-scan-beginning-of-command] 1 (#$ . 51531) "P"]) #@63 Go to the end of an M command. Travells a cross continuations (defalias 'matlab-end-of-command #[nil "\300 \207" [matlab-scan-end-of-command] 1 (#$ . 51717) nil]) #@57 Return column of previous line's comment start, or nil. (defalias 'matlab-line-continued-comment #[nil "\212\304 \210\305\306!\211\211@\307=\205 A@\310=)?\206o?\2058\311y\210\305\306!\n 8\307=\2057\212 8b\210i))*\207" [lvl lvl1 mlf-end-comment-type mlf-end-comment-pt beginning-of-line matlab-compute-line-context 1 comment nil -1] 3 (#$ . 51886)]) #@306 Count the change in block depth across lines. Start at LVL1-START, and end at LVL1-END. It is ok if these are the same line. A positive number means there were more block starts and ends. A negative number means there were more ends than starts. 0 means no blocks, or that all blocks started also ended. (defalias 'matlab-line-count-block-change #[(&optional lvl1-start lvl1-end) "\204\n\306\307!\211\211@)\310=\204\211@)\311=\203 \312\207\212 @:\203-@\202.8b\210\312\313 !\314 \n8)b\210\315\316 \"\211\203b\f@\317=\203ZS\202BT\202B,\207" [lvl1-start lvl1-end lvl1 mlf-point keyword bounds matlab-compute-line-context 1 comment empty 0 matlab-line-end-of-code nil matlab--scan-next-keyword blocks end depth] 4 (#$ . 52252)]) #@64 Return a string representing the function called nearby point. (defalias 'matlab-function-called-at-point #[nil "\212\300 \210\301\302!\203\303\304!\202&\305\306\307 \310#\203%\301\311!\203%\303\304!\202&\312)\207" [beginning-of-line looking-at "\\s-*\\([a-zA-Z]\\w+\\)[^=][^=]" match-string 1 re-search-forward "=" matlab-point-at-eol t "\\s-*\\([a-zA-Z]\\w+\\)\\s-*[^=]" nil] 4 (#$ . 53021)]) #@122 Place the cursor on the beginning of a valid comment on this line. If there isn't one, then return nil, point otherwise. (defalias 'matlab-comment-on-line #[nil "\304\305!\211 8\306=\205\n8)\211\205 b*\207" [lvl1 mlf-end-comment-type mlf-end-comment-pt comm matlab-compute-line-context 1 comment] 3 (#$ . 53429) nil]) #@170 Indent the region between START And END for MATLAB mode. Unlike `indent-region-line-by-line', this function captures parsing state and re-uses that state along the way. (defalias 'matlab-indent-region #[(start end &optional column noprogress) "\212\306! b\210\307 ?\205\n?\205\310\311`#\312\211`W\203Xn\203+l\2048\313\314!\313\315 \"\316\f!\210\314y\210 \203 `\312\247\203N@Y\205S\317#\266\202 \203`\320 !\210\312\211\223,\207" [end start noprogress lvl1 lvl2 pr copy-marker minibufferp make-progress-reporter "MATLAB Indenting region..." nil matlab-compute-line-context 1 2 matlab--indent-line progress-reporter-do-update progress-reporter-done] 7 (#$ . 53763) nil]) #@33 Indent a line in `matlab-mode'. (defalias 'matlab-indent-line #[nil "\301\302!\303!)\207" [lvl2 matlab-compute-line-context 2 matlab--indent-line] 2 (#$ . 54468) nil]) #@51 Tests to override this to validate indent-region. (defvar matlab--change-indentation-override 'matlab--change-indentation (#$ . 54644)) #@197 Indent the current line according to MATLAB mode. Input LVL2 is a pre-scanned context from `matlab-compute-line-context' lvl2. Used internally by `matlab-indent-line', and `matlab-indent-region'. (defalias 'matlab--indent-line #[(lvl2) "\303!\n !)\207" [lvl2 i matlab--change-indentation-override matlab--calc-indent] 2 (#$ . 54787)]) #@110 Change the indentation on line to NEW-INDENTATION. This function exists so the test harness can override it. (defalias 'matlab--change-indentation #[(new-indentation) "\305]\306 i\n Z\212\307 \210\f\305U\2044\f\305W\203# j\210\2024\f\nX\2034\212\310 \311\"\210`)`|\210) \nX\203A\310\305 ]!\210\f\305U,?\207" [new-indentation i ci cc diff 0 current-indentation back-to-indentation move-to-column t] 3 (#$ . 55131)]) #@65 Return the appropriate indentation for this line as an integer. (defalias 'matlab--calc-indent #[(&optional lvl2 debug-sym) "\204\303\304!\305!\n\203\n L\210 A@)\207" [lvl2 sem debug-sym matlab-compute-line-context 2 matlab-calculate-indentation] 2 (#$ . 55562)]) #@379 Return the indentation recommendation from the previous line of CODE. Uses the lvl2 context of the current line of code it scans backward from. This function scans backward over blank lines and comments to find a line of code. It then scans that line and recommends either: - same indentation - if just boring old code. - indent more - if has control block openings on it. (defalias 'matlab--previous-line-indent-recommendation #[(lvl2) "\212\306 \210o)\203 \307\207\310!\n 8)\203\311! 8)\207\312!\212 \f@:\2030\f@\2021\f8b\210\f\211@)\313=\203K\212\306 \210o)\203K\307\202N\314\f!*\207" [lvl2 lvl1 mlf-paren-outer-point mlf-indent prevcmd mlf-point beginning-of-line 0 matlab-get-lvl1-from-lvl2 matlab-previous-nonempty-line matlab-previous-code-line empty matlab-next-line-indentation] 3 (#$ . 55841)]) #@70 Prompt the user about whether to change `matlab-functions-have-end'. (defconst matlab-functions-have-end-should-be-true "This end closes a function definition.\nDo you want functions to have ends? " (#$ . 56673)) #@96 When in non-interactive mode run (yes-or-no-p prompt), otherwise return NONINTERACTIVE-DEFAULT (defalias 'matlab--maybe-yes-or-no-p #[(prompt noninteractive-default) "\203 \207\303\n!\207" [noninteractive noninteractive-default prompt yes-or-no-p] 2 (#$ . 56892)]) #@286 Calculate out the indentation of the current line. Return a list of descriptions for this line. Return format is: '(TYPE DEPTHNUMBER) where TYPE is one of (comment, code, function, blockstart, blockmid, blockendless, blockend) DEPTHNUMBER is how many characters to indent this line. (defalias 'matlab-calculate-indentation #[(&optional lvl2) "\204\306\307!\310!\311\211\211@)\312=\203\307\n\211\211@)\312=\205' \n8)\211\313=\2045\f\314=\203N\312\n \n8\312=\205I\212@\n8b\210i))D\202\303\f\315=\203o\312\307\n \n8\312=\205i\212@\n8b\210i))\\D\202\303\316 \203\202\317!\211\203\202\320 D\202\303\f\321=\203\223\312\322!A\\D\202\303\n\211\211@)\312=\205\244 \n8\323=)\203\256\324\325D\202\303\326 \211\203\273\312 D\202\303\312\322!A\\D)\202\222\n\211\211@)\321=\205\330 \n8\327=)\203\nB\204\346\325\202\330 \204\212\331 \210\332\327!)\203\322!C\\\202\322!\333 D\202\222\n\211@)\334=\203w\212D\n@:\203\"\n@\202#\n8b\210\335 )\211E@\327=\203eB\204K\336F\337\"\203E\340\341!\202H\342\343!\203p\330 \203^\344E8G\n8)\202p\322!\202p\344E8G\n8))\345 D\202\222\n\211@\321=\205\205\nA@\346=)\203\317\347\212\350 \210\351 \203\231\342\352!\202\312\353`!H\354H8\206\251\355H8)?\205\300\356\357\212\360\361!\210`)\212\362\361!\210`)\"!\363=\204\311\342\364!\210i)D\202\222\n\211@\321=\205\335\nA@\365=)\2038\366\212\350 \210\351 \203\361\342\367!\2023\353`!H\354H8\206\355H8)?\205\356\357\212\360\361!\210`)\212\362\361!\210`)\"!\363=\204#\342\370!\2023iI<\2030I@\2022I\\)D\202\222\n\211@)\371=\203\251\372\nJ\n8)K\nL\n8)M\373KN\"\211O\205rOA<\203oOA@\202rOAPO\205\212OA<\203\207OAA\202\212OA\211Q\203\242M\322!ZPV\203\242QS\202\244M-D\202\222\nR\n8)\204\300\374 \204\300\375\322!D\202\222\nL\n8)\203d\212\376 \210\306\341!)\211SG\n8)TSD\n8)U\nL\n8)V\nJ\n8)W\nX\n8)\211Y\205\212Yb\210\377 )Z\nR\n8)[W\203-W\201lU\203-\201m\202VV\203@ZVU\203@\201n\202VY\203SY[U\204S\201o\202V\201p\\\311]\212\\\201m=\203\327\212Yb\210\201q\201r!\210\201s^!)\203\327\201t \311_`\201u\216\201va!\210Yb\210\201s\201w!\210\325\225\211]+\203\327\212]b\210\201s\201x!)\204\327]b\210\201y\311w\210iVZbV\203\322Vb\\\202Zi\202Z\373WN\"\211O\205\364OA<\203\361OA@\202\364OAPO\205\fOA<\203 OAA\202\fOAQYb\210\341u\210\201y\311w\210c\203*\201s\201z!\203W\\\201m=\204E\\\201n=\204N\\\201o=\204NTd\\\202YVe\\\202Yi+)\\ .\nD\202\222\212\201ry\210\306\341!)f\212\201{y\210\306\341!)gfG\n8)hfD\n8)UgD\n8)i\n\211@)\201|=\203\254\201|\202\257\201p\\\311]\212g \n8)\201}=\203\313UiU\203e\212Ub\210\201~\201\201\200 \337#\203\347\354\353`!8\204\320h\201\201U\205\371\201y\311w\210`\211])\203e\212]b\210i\201\201N\236\322!jOk\201s\201z!\203'jOAA\\\202aO\203^kjZOA<\203?OA@\202BOAV\203^jOA<\203VOAA\202YOA\\\202ak,\202\213g \n8)\201}=\203{UiU\203\210\201\202f!d\\\202\213h)\\ .D*\207" [lvl2 tmp lvl1 mlf-stype comment-style mlf-end-comment-type matlab-compute-line-context 2 matlab-get-lvl1-from-lvl2 nil comment block-end block-body-prefix block-body matlab-last-guess-decl-p matlab-scan-comment-help-p comment-help block-start matlab--previous-line-indent-recommendation indent-ignore comment-ignore 0 matlab-line-continued-comment decl matlab-indent-function-body-p beginning-of-line matlab--scan-block-backward-up-until function end matlab-scan-block-start-context matlab--maybe-yes-or-no-p t matlab-functions-have-end-minor-mode 1 error "Unmatched end" 3 blockend mid blockmid back-to-indentation matlab--scan-block-backward-up "Missing start block" syntax-ppss 8 9 matlab-keyword-p buffer-substring-no-properties skip-syntax-backward "w_" skip-syntax-forward ctrl "Does not match opening block type" case blockendless "Missing switch" "Wrong type of start block" close-paren array-end assoc matlab-scan-previous-line-ellipsis-p code matlab-scan-beginning-of-command current-indentation mlf-end-comment-pt matlab-comment-anti-indent matlab-functions-have-end matlab-indent-level mlf-point CTXT matlab-functions-have-end-should-be-true mlf-indent pps matlab-case-indent-level mlf-paren-inner-char fc mlf-paren-inner-col pc matlab-maximum-indents mi max ind mlf-paren-outer-point boc-lvl1 ci-boc boc parencol parenchar mlf-paren-inner-point parenpt parenindent parenopt indent-type found-column matlab-indent-past-arg1-functions case-fold-search oldsyntax matlab-navigation-syntax-table matlab-arg1-max-indent-length matlab-align-to-paren matlab-continuation-indent-level matlab-array-continuation-indent-level prev-lvl1 prev2-lvl1 ci-prev boc2 prev-indent cc 40 function-call-cont array-solo-cont nested-array-cont code-cont forward-symbol -1 looking-at syntax-table #[nil "\301!\207" [oldsyntax set-syntax-table] 2] set-syntax-table "(\\s-*\\(?:\\w\\|\\.\\)+\\s-*," "\\s-*\\(\\.\\.\\.\\|$\\|)\\)" " " "\\.\\.\\.\\|$" -2 empty ellipsis re-search-forward "=" matlab-point-at-eol 61 matlab-next-line-indentation] 7 (#$ . 57167)]) #@141 Calculate the indentation for lines following this command line. See `matlab-calculate-indentation' for how the output of this fcn is used. (defalias 'matlab-next-line-indentation #[(lvl1) "\212 @:\203 @\202 8b\210\306 )\212\307 !\210\310\311!\312 \" \211@)\305=\f\313W\204;\f\313U\203k \203k\212 @:\203H @\202I 8b\210\314 !\210\315\316\305!\317 \320#\210\321 )\3228 8*\202\315\323 \204\211 \211\211@)\324=\205\202 8\325=)\203\211\fS \203\220\fT\326\327 \f_ \211@\324=\205\247 A@\330=)\203\257\311\202\260\331_A \211@\324=\205\302 A@\332=)\203\312\311\202\313\331_$-\207" [mlf-point lvl1 startpnt boc-lvl1 depthchange end point-at-eol matlab-scan-beginning-of-command matlab-compute-line-context 1 matlab-line-count-block-change -1 matlab-line-end-of-code matlab-re-search-keyword-backward matlab-keyword-regex point-at-bol t matlab-scan-block-start-context 3 matlab-indent-function-body-p block-start decl + current-indentation mid 0 case CTXT mlf-indent mlf-stype matlab-indent-level matlab-case-indent-level] 8 (#$ . 62346)]) #@224 Return t if `electric-indent-mode' should indent after CHAR is inserted. Return nil otherwise. This function recommends indenting after special keywords that typically cause indentation changes so the code fixes itself up. (defalias 'matlab-electric-indent-function #[(char) "\302\267\2029\303\304!\211\211@\305=\205 A@\306=)\206+ \211@\305=\205* A@\307=))\207\303\304!\211\211@*\310=\207\311\207" [char lvl1 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (101 6 100 45)) matlab-compute-line-context 1 block-start mid case end nil] 3 (#$ . 63431)]) #@49 Handle carriage return for MATLAB comment line. (defalias 'matlab-comment-return #[nil "\300 \210\301 \207" [newline matlab-comment] 1 (#$ . 64035) nil]) #@89 Indent line and insert comment character. Argument ARG specifies how many %s to insert. (defalias 'matlab-electric-comment #[(arg) "\303\206\304!\210 \305=\204- \306=\2053\307\304!\211@)\310=\2053`S\206&`Sf\305=\2053\311 \210\312\313w\207" [arg last-command-event lvl1 self-insert-command 1 37 94 matlab-compute-line-context comment matlab-indent-line "%^" nil] 3 (#$ . 64195) "P"]) #@99 Indent line and insert block comment end character. Argument ARG specifies how many %s to insert. (defalias 'matlab-electric-block-comment #[(arg) "\305\206\306!\210\307\306!\211\211\211@)\310=\205#\n 8\311>\205# 8) \211\211@)\310=\2054\n 8)\312=\203?\313 \202_ \211\211@)\310=\205N\n 8)\314=\205_\313 \210\f\205_\315\f`\"*\207" [arg lvl1 mlf-stype mlf-entity-start bc self-insert-command 1 matlab-compute-line-context comment (block-start block-end block-body block-body-prefix) block-start matlab-indent-line block-end pulse-momentary-highlight-region] 4 (#$ . 64593) "P"]) #@36 Add a comment to the current line. (defalias 'matlab-comment #[nil "\306\307!\310 \203\311\312!\202\266\211@)\313=\203( c\210\314 \210\315 \210\316\317w\202\266\211@)\320=\203>\314 \210\315 \210\316\317w\202\266\n8\320=\205P\212 8b\210i))\203\225\n8\320=\205a 8)b\210i\fV\203m\321 \210i\fW\203v\fj\210\322 \323 Z\211V\203\216\321 \210\f ZZj\210)\324\317w\202\266\317\210\325\326\327\330#\210\317u\210\321 \210i\fW\203\260\fj\210\202\263\331c\210c)\207" [lvl1 matlab-comment-line-s mlf-end-comment-type mlf-end-comment-pt comment-column eol-col matlab-compute-line-context 1 region-active-p call-interactively comment-or-uncomment-region empty back-to-indentation matlab-indent-line " %" nil comment delete-horizontal-space point-at-eol point-at-bol "% " re-search-backward "[^ \n^]" 0 t " " fill-column matlab-comment-on-line-s] 5 (#$ . 65195) nil]) #@132 Break the current line, and if in a comment, continue it. Optional argument SOFT indicates that the newline is soft, and not hard. (defalias 'matlab-comment-line-break-function #[(&optional soft) "\301\302`!8\204\303 \210\304 \207\203\305\306!\210\202\303\307!\210\310c\210\304 \210\311 \210\310\312w\207" [soft 4 syntax-ppss newline matlab-indent-line insert-and-inherit 10 1 "% " back-to-indentation nil] 3 (#$ . 66092) nil]) #@230 Comments every line in the region. Puts `matlab-comment-region-s' at the beginning of every line in the region. BEG-REGION and END-REGION are arguments which specify the region boundaries. With non-nil ARG, uncomment the region. (defalias 'matlab-comment-region #[(beg-region end-region arg) "\306 \307 \211\n\310\223\210 b\210\311 \210\f\204+ c\210\312y\313U\203Y` W\203Y c\210\202\314 !\315!\203<`\313\225|\210\312y\313U\203X` W\203X\315!\203<`\313\225|\210\202<)b\210 \310\211\223\210\310\211\223*\207" [save-point end-region-mark end-region beg-region arg matlab-comment-region-s make-marker point-marker nil beginning-of-line 1 0 regexp-quote looking-at com] 4 (#$ . 66534) "*r\nP"]) #@109 Uncomment the current region if it is commented out. Argument BEG and END indicate the region to uncomment. (defalias 'matlab-uncomment-region #[(beg end) "\302 \303#\207" [beg end matlab-comment-region t] 4 (#$ . 67250) "*r"]) #@55 Set the `fill-prefix' for the current (comment) line. (defalias 'matlab-set-comm-fill-prefix #[nil "\305\306!\211@)\307=\205H\212\310 \210\311 \312\313\314\n\315#\203(\312\316\317`!8)\204\320\321!\322\323 \"\203<\324\325 GS\326\"P\325i GZ\326\" P+\211\207" [lvl1 pf e incomplete fill-prefix matlab-compute-line-context 1 comment beginning-of-line matlab-point-at-eol nil re-search-forward "%+[ ]*\\($$$ \\|\\* \\)?" t 3 syntax-ppss match-string 0 string-match "%\\s-*\\* " "%" make-string 32] 5 (#$ . 67485) nil]) #@63 Set the `fill-prefix' for the current post-code comment line. (defalias 'matlab-set-comm-fill-prefix-post-code #[nil "\300 \207" [matlab-set-comm-fill-prefix] 1 (#$ . 68018) nil]) #@26 Reset the `fill-prefix'. (defalias 'matlab-reset-fill-prefix #[nil "\301\211\207" [fill-prefix nil] 2 (#$ . 68204)]) #@281 For the current line, position the cursor where we want to break the line. Basically, spaces are best, then operators. Always less than `fill-column' unless we decide we can fudge the numbers. Return nil if this line should not be broken. This function will ONLY work on code. (defalias 'matlab-find-convenient-line-break #[nil "\306\307!\211 8)\310=?\205\221\214\311 \312 }\210\313\n!\210\314`\211@)\315=\206+\311 \211b\210i\n ZV\203Ci\n \\W\203C\316\202\220 b\210\212\317\320\314\316#)\212\321\320\314\316#)\206_\312 `Z `\206k\311 Z!\203\207\212b\210`\212\322 \210`)X\203\206\314)\203\243 W\203\243 !W\203\243b\210\316\202\303\203\277! W\203\277! W\203\277b\210\316\202\303 b\210\314,\206\220\321\323\314\316#\210\324\325!\203\333\321\323\314\316#\204\315\324\323!\203\354`\212\322 \210`)X\203\373 b\210\321\326\314\316#\203\214\316\202\220\307u\210i\212\3271\f\330\331!0\210\202 \210\212\331u\210\324\332!)\203\331v\210i)\212\3331*\330\307!0\210\202+\210i)\"#$\"%W\203m\"\n \\X\203m \334_\"$ZX\204W\"\nX\203m\212\313\"!\210\324\335!)\204m\313\"!\210\316\202\210\334 _$#ZY\203\202\313#!\210\316\202\210\313$!\210\316+\206\220 b\210\314+)\207" [lvl1 mlf-end-comment-type fill-column orig pos matlab-fill-fudge matlab-compute-line-context 1 ellipsis matlab-point-at-bol matlab-point-at-eol move-to-column nil comment t re-search-forward "[ ]" re-search-backward back-to-indentation "\\(\\s-\\|\\s.\\)+" looking-at "\\^\\|\\.\\|'" "\\s.+" (error) matlab-up-list -1 "\\w" (error) 2 "\\^" after before afterd befored endlst startlst okpos matlab-fill-fudge-hard-maximum] 5 (#$ . 68329)]) #@164 Do auto filling. Set variable `auto-fill-function' to this symbol to enable MATLAB style auto filling which will automatically insert `...' and the end of a line. (defalias 'matlab-auto-fill #[nil " \n\203&\212\306 !\210o\204\307u\210\310\311\312`!8)\203!\313\202\"\311)\202'\314Z\315\316!i V\205\230\f\211\211@)\317=\205E \f8\320=)\203M\310\202\230\f\211@)\317=\204o\212\306 !\210\313\312`!8)\203z\f\211@)\317=\203z\321 \210\322 \210\323 \202\230\f\211@)\317=\206\213\f\211@)\324=?\205\230\f4\f8)\325=?\205\2305\205\230\326 \2116`\310\223\210\3276\330\"\210\331 \203\224\212\307u\210\310\311\312`!8*\204\324\332 \210\3337\334\261\210\335 \210\202\2248\203\224`\3109:\336\337\340 \330#\203\361\307u\210\341\342!\204\337`9\341\343!\204%\212\344\310x\210\307u\210\341\343!)\204%\345 \210\3467P\310x\210`eV\203,\307u\210\341\3477P!\203,:b\210\202=9b\210\316u\210\350c\210:b\210\316u\210\344\310w\210\3517\334\261\210\335 \210\337c\210\341\352!\204\223\212\353\354\355 \330#\204o\310\210\356c\2106`\357Z\310\223\210\202\222\336\337!\210\341\352!\204\222\341\360!\204\205\341\361!\203\216\316u\210\362c\210\202\222\341\363!\210)*6b)+\207" [fill-prefix fill-column matlab-fill-count-ellipsis-flag incomplete lvl1 mlf-stype move-to-column -1 nil 3 syntax-ppss 4 0 matlab-compute-line-context 1 comment indent-ignore matlab-set-comm-fill-prefix do-auto-fill matlab-reset-fill-prefix empty ellipsis make-marker set-marker-insertion-type t matlab-find-convenient-line-break delete-horizontal-space " " "\n" matlab-indent-line re-search-backward "'" point-at-bol looking-at "''" "\\[" " " beginning-of-line " \n" "'\\s-*" "[" "' " "'\\s-*]" re-search-forward "[^']'\\([^']\\|$\\)" line-end-position "']" 2 "'\\s-*$" "'\\s-*[^]]" "]" "'\\s-*\\.\\.\\." mlf-end-comment-type matlab-fill-code m matlab-elipsis-string matlab-fill-strings-flag pos2 pos] 6 (#$ . 70018) nil]) #@53 Join current comment line to the next comment line. (defalias 'matlab-join-comment-lines #[nil "\300\210\301\302!\203\303\304\305\211\300$\207\306\307!\207" [nil looking-at "\n[ ]*%" replace-match " " t error "No following comment to join with"] 5 (#$ . 71953) nil]) #@110 Fill the region between BEG-REGION and END-REGION. Non-nil JUSTIFY-FLAG means justify comment lines as well. (defalias 'matlab-fill-region #[(beg-region end-region &optional justify-flag) "\304 \211 \305\223\210\nb\210\306 \210`W\205!\307 !\210\310y\210\306 \210\202)\207" [end-reg-mk end-region beg-region justify-flag make-marker nil beginning-of-line matlab-fill-paragraph 1] 4 (#$ . 72231) "*r\nP"]) #@53 *The regular expression for skipping comment start. (defconst matlab-cline-start-skip "[ ]*%[ ]*" (#$ . -72646)) #@85 Fill the current comment line. With optional argument, JUSTIFY the comment as well. (defalias 'matlab-fill-comment-line #[(&optional justify) "\303 \204 \304\305!\210\306 \210\307!\203o\204\310y\210\306 \210\202\f\307!\204(\311y\210\214`\212\307!\203C\212\312\210m)\204C\311y\210\306 \210\202+\307!\204L\310y\210\312\210`)}\210\303 \210\307\313!\210\314i\315\"\316\317!P\320ed\n#*\207" [matlab-cline-start-skip fill-prefix justify matlab-comment-on-line error "No comment to fill" beginning-of-line looking-at -1 1 nil "%[ ]*" make-string 32 match-string 0 fill-region] 4 (#$ . 72767) nil]) #@42 Delete space on end of line and justify. (defalias 'matlab-justify-line #[nil "\212\300\210\301 \210\302 )\207" [nil delete-horizontal-space justify-current-line] 1 (#$ . 73383) nil]) #@159 When in a comment, fill the current paragraph. Paragraphs are always assumed to be in a comment. ARG is passed to `fill-paragraph' and will justify the text. (defalias 'matlab-fill-paragraph #[(arg) "\306\307!\211@)\310=\204!\311\312`!8\203V\306\307! 8)\313=\204V\314\315\316\212\317 \210\320\321!\2034\316\210\307u\210\322 )\212\323 )\316()\324 \210\214\fd T^}\210\325*!.\207\306\307!\211+\211@)\310=\206m+\211@)\326=)\204\214\212\317 \210\327 \210`)\212\323 )}\210eb\210\330\331\316\332#\203\322m\204\322\333 \210\306\307! 8)\313=\203\254\334\224b\210\307u\210`\335 |\210m\204\264\336\307!\210\333 \210\320\337!\203\314\311\312`!8\203\314\336\307!\210\333 \210\340c\210\202\204db\210i,-\\V\204\346i.V\203`\341 \210`U\203\363\342\343!\210*\203\325\212\344y\210\345 \210)\202\325*\205\212\344y\210\345 ))\207\346\347!\207" [lvl1 mlf-end-comment-type fill-prefix end start paragraph-ignore-fill-prefix matlab-compute-line-context 1 comment 4 syntax-ppss ellipsis "%%\\|%[a-zA-Z]\\|%[ ]*$\\|[ ]*$" "%[a-zA-Z]\\|%[ ]*$\\|[ ]*$\\|%\\s-*\\*" nil matlab-scan-beginning-of-command looking-at "%%" point-at-bol matlab-scan-end-of-command matlab-set-comm-fill-prefix fill-paragraph empty beginning-of-line re-search-forward "$" t delete-horizontal-space 0 matlab-point-at-eol delete-char "% *" " " matlab-auto-fill error "Fill algorithm failed!" -1 matlab-justify-line message "Paragraph Fill not supported in this context." paragraph-start paragraph-separate arg lvl fill-column matlab-fill-fudge matlab-fill-fudge-hard-maximum] 7 (#$ . 73575) "P"]) #@158 Function to assign to `show-paren-data-function'. Highlights parens and if/end type blocks. Returns a list: (HERE-BEG HERE-END THERE-BEG THERE-END MISMATCH) (defalias 'matlab-show-paren-or-block #[nil "\306\307`!8?\205\270\310 \311\216\212\312\211\211\211\211\211\313`!\313`S!\312\211fh\312\"#$%&'(\"\203\225\314\"!\315U\203\225`(`T'\3161\212\317)\312*\320)!*\210`S&`%\313&!&f\314\f!\321U\203\201\fA U\203\201\"A U?\205\205\322\211$0\210\202\244+\322\211$)\210\202\244 \203\364\314 !\321U\203\364`S(`'\3231\351\317)\312*\320)[!*\210`T%`&\313&!&f\314\f!\315U\203\340\fA\nU\203\340 A U?\205\344\322\211$0\210\202\244+\322\211$)\210\202\244\212\324\325!\210`),\212\326\325!\210`)-\327,-\".\330.!\211/\205!/.,-F,\31201\3311!\203\243\33218b\210\3331\2331@\334=\203\262\33218(\33518'\336 \203X\322\211$\202\226\212\324\325!\210`),\212\326\325!\210`)-\327,-\".\330.!\211/\205\205/.,-F,\2110\204\2372\203\230\322\211$\202\226\312\211$\202\226\33208&\33508%\312\211$\202\2261@\337>\203 \33218(\33518'\336 \203\322\322\211$\202\226\212\324\325!\210`),\212\326\325!\210`)-\327,-\".\330.!\211/\205\377/.,-F,\2110\204 \322\211$\202\226\33208&\33508%\312\211$\202\2261@\340>\203\222\33218(\33518'(b\210\341 \203D\322\211$\202\226\212\324\325!\210`),\212\326\325!\210`)-\327,-\".\330.!\211/\205q/.,-F,\2110\204\322\211$\202\226\33208&\33508%\312\211$\202\226\322\211#0\210\202\243+\322\211$)\210*#?\205\266('&%$\257.\207" [save-match-data-internal there-char here-prev-char here-char there-syntax here-prev-syntax 8 syntax-ppss match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] nil syntax-after syntax-class 4 (error) 1 forward-sexp 5 t (error) skip-syntax-backward "w_" skip-syntax-forward buffer-substring-no-properties matlab-keyword-p matlab--valid-keyword-node 2 (error) decl 3 matlab--scan-block-forward (ctrl args mcos) (end mid case) matlab--scan-block-backward-up here-syntax noreturn mismatch there-end there-beg here-end here-beg count forward-sexp-function err start end txt type endsym startsym matlab-functions-have-end] 13 (#$ . 75173)]) #@38 Toggle `matlab-show-mlint-warnings'. (defalias 'matlab-toggle-show-mlint-warnings #[nil "? \203\203\302 \210\202\303 \210\304 \204\203!\305\202\"\306!\207" [matlab-show-mlint-warnings matlab-highlight-cross-function-variables mlint-buffer mlint-clear-warnings mlint-minor-mode 1 -1] 2 (#$ . 77448) nil]) #@53 Toggle `matlab-highlight-cross-function-variables'. (defalias 'matlab-toggle-highlight-cross-function-variables #[nil "? \203\203\302 \210\202\303 \210\304\204 \203!\305\202\"\306!\207" [matlab-highlight-cross-function-variables matlab-show-mlint-warnings mlint-buffer mlint-clear-cross-function-variable-highlighting mlint-minor-mode 1 -1] 2 (#$ . 77772) nil]) #@56 Verify the current buffer from `write-contents-hooks'. (defalias 'matlab-mode-verify-fix-file-fn #[nil "\203\n\302d V!\210\303\207" [matlab-verify-on-save-flag matlab-block-verify-max-buffer-size matlab-mode-verify-fix-file nil] 3 (#$ . 78154)]) #@233 Verify the current buffer satisfies all M things that might be useful. We will merely loop across a list of verifiers/fixers in `matlab-mode-verify-fix-functions'. If optional FAST is non-nil, do not perform usually lengthy checks. (defalias 'matlab-mode-verify-fix-file #[(&optional fast) "\212\302!\210\303\304 \"\210)\305 \205\306\307!\207" [fast matlab-mode-verify-fix-functions matlab-mode-vf-guess-functions-have-end mapc #[(func) " !\207" [func fast] 2] matlab-called-interactively-p message "Done."] 3 (#$ . 78409) nil]) #@124 Look at the current buffer state and decide determine if functions have end. If this is already known, no action is taken. (defalias 'matlab-mode-vf-guess-functions-have-end #[(&optional fast) "\303 \211\304=\203\302\305\306!\202q\212db\210\307\310`!8)\203*\302\305\306!\210\311\312!\202q \302=\203E\313\314!\211\203>\305\306!\202A\305\315!)\202q \204c\316=\204U\317=\203c\311\320!\210\305\306!\210\321\306!\202q \205q =?\205q\305\306!)\207" [filetype matlab-functions-have-end guess matlab-guess-script-type empty matlab-functions-have-end-minor-mode 1 9 syntax-ppss message "Unterminated list - skipping block check" matlab-do-functions-have-end-p no-navigate -1 script class "Type of file detected no longer matches `matlab-functions-have-end' of nil, assume t." sit-for] 4 (#$ . 78949)]) #@79 Verify/Fix the function name of this file. Optional argument FAST is ignored. (defalias 'matlab-mode-vf-functionname #[(&optional fast) "\306 \307\310\216\311\n!\210eb\210\312 \210\307\313\314\315 !!\316  \205L @\317=\205L A@\f\230?\205L\320\321 8\322 8\323#\205L\321 8b\210\321 8\322 8|\210\fc.\207" [case-fold-search oldsyntax matlab-navigation-syntax-table fcn bn func syntax-table nil #[nil "\301!\207" [oldsyntax set-syntax-table] 2] set-syntax-table matlab-find-code-line file-name-sans-extension file-name-nondirectory buffer-file-name matlab-line-declaration-name function matlab-mode-highlight-ask 2 3 "Function name and file names are different. Fix function name?"] 4 (#$ . 79769)]) #@76 Verify/Fix the class name of this file. Optional argument FAST is ignored. (defalias 'matlab-mode-vf-classname #[(&optional fast) "\305 \306\307\216\310\n!\210eb\210\311 \210\306\312\313\314 !!\315 \211\205L @\316=\205L A@\f\230?\205L\317\320 8\321 8\322#\205L\320 8b\210\320 8\321 8|\210\fc.\207" [case-fold-search oldsyntax matlab-navigation-syntax-table class bn syntax-table nil #[nil "\301!\207" [oldsyntax set-syntax-table] 2] set-syntax-table matlab-find-code-line file-name-sans-extension file-name-nondirectory buffer-file-name matlab-line-declaration-name classdef matlab-mode-highlight-ask 2 3 "Class name and file names are different. Fix class name?"] 5 (#$ . 80480)]) #@91 Verify/Fix adding ENDS to functions. Optional argument FAST skips this test in fast mode. (defalias 'matlab-mode-vf-add-ends #[(&optional fast) "?\205 \301\302\303\"\207" [fast matlab-mode-vf-block-matches-forward nil t] 3 (#$ . 81179)]) #@328 Verify/Fix unterminated (or un-ended) blocks. This only checks block regions like if/end. If `matlab-mode-vf-add-ends' is part of your verify list, this will not be needed. Optional argument FAST causes this check to be skipped. Optional argument ADDEND asks to add ends to functions, and is used by `matlab-mode-vf-add-ends' (defalias 'matlab-mode-vf-block-matches-forward #[(&optional fast addend) "\306\211\211\307 \310=\204\212db\210\311\312`!8)\203\313\314 \306%\315\216\316&!\210eb\210\f?\205\277 ?\205\277\317\320d\"\205\277\321v\210\322 \211\204W'\323=\203\261\324\325!\210\202\261\212\326\n@8\327\n@8(\211)b\210*\203\242\330)(\331#\203|\332 \210\202\260\333=\203\260\330)(\334#\203\223\324\325!\210\202\260\324\321!\210\335\336!\210\337\325!\210\202\260\330)(\340#\204\260\341\342!\210+\335\343\344`_d\245\326\245\"\210\202..\207" [filetype exit scanstate expr fast case-fold-search nil matlab-guess-script-type empty 9 syntax-ppss t syntax-table #[nil "\301!\207" [oldsyntax set-syntax-table] 2] set-syntax-table matlab--scan-next-keyword decl -1 matlab--scan-block-forward guess matlab-functions-have-end-minor-mode 1 2 3 matlab-mode-highlight-ask "Unterminated block. Try to add end?" matlab-mode-vf-add-end-to-this-block function "Should funtions have end in this file?" message "Marking buffer as not needing END for this session." sit-for "Unterminated block. Continue anyway?" error "Unterminated Block found!" "Block-check: %d%%" 100 oldsyntax matlab-navigation-syntax-table matlab-functions-have-end e s addend] 5 (#$ . 81426)]) #@51 Add an end to the current block the cursor is on. (defalias 'matlab-mode-vf-add-end-to-this-block #[nil "\212\300\210\301\302\300\303#\203\304 \210\212\305c\210)\306 \202#db\210\212\307c\210)\306 )\207" [nil re-search-forward "^function " t beginning-of-line "end\n\n" matlab-indent-line "\nend\n\n"] 4 (#$ . 83024)]) #@71 Highlight from BEGIN to END while asking PROMPT as a yes-no question. (defalias 'matlab-mode-highlight-ask #[(begin end prompt) "\306 p#\307\211\3101 \311\f\312\313#\210\314 !\315\f!0\210\202)\210\315\f!\210\316\317!\210\n+\207" [begin end ans show-paren-mode mo prompt matlab-make-overlay nil (quit) matlab-overlay-put face matlab-region-face y-or-n-p matlab-delete-overlay error "Quit"] 4 (#$ . 83352)]) #@82 Regular expression used to detect if a semicolon is needed at the end of a line. (defvar matlab-quiesce-nosemi-regexp "\\s-*\\(function\\|parfor\\|for\\|spmd\\|while\\|try\\|catch\\|switch\\|otherwise\\|case\\|break\\|if\\|else\\|end\\|return\\|disp\\|$\\|%\\)" (#$ . 83771)) #@170 Find all commands that do not end in ;, and add one. This has the effect of removing any extraneous output that may not be desired. Optional argument FAST is not used. (defalias 'matlab-mode-vf-quiesce-buffer #[(&optional fast) "\212\302 \210eb\210\303\304\212\305\210m)\204O\306\307\310 !H!\210 \\\211\311V\204, \303W\2035[\312_ \\\313 \210\314 \203I\315``T\316#\203I\317c\210\320y\210\202 +\306\321!\207" [dir msgpos push-mark 0 0.2 nil message ["Scanning o...." "Scanning .o..." "Scanning ..o.." "Scanning ...o." "Scanning ....o"] floor 5 2 matlab-scan-end-of-command matlab-line-end-of-code-needs-semicolon-p matlab-mode-highlight-ask "Add Semi colon here? " ";" 1 "Scanning .... done"] 5 (#$ . 84054) nil]) #@66 Display type and attributes of current line. Used in debugging. (defalias 'matlab-show-line-info #[nil "\306 \307\310\216\311\n!\210\312\313\314!\315\f!\316 \317\"!\307\320\f\321\"\"\322 !#\323 $ \324!\325\326A@!\327\326#!\330\331@!\260  % 8)\332=\203V \333P % 8\334=\205e& 8)\203m \335P$\203x \336$Q\337\340 \". \207" [case-fold-search oldsyntax matlab-navigation-syntax-table msg lvl2 lvl1 syntax-table nil #[nil "\301!\207" [oldsyntax set-syntax-table] 2] set-syntax-table "" matlab-compute-line-context 2 matlab-get-lvl1-from-lvl2 matlab-describe-line-indent-context t matlab--calc-indent indent matlab-next-line-indentation matlab-current-defun "Line Syntax: " " | Preferred Indents: This: " int-to-string " Next: " " Indent Style: " symbol-name ellipsis " w/cont" comment " w/comm" " Defun: " message "%s" lvl1msg fullindent nexti defn mlf-end-comment-type mlf-end-comment-pt] 10 (#$ . 84788) nil]) (provide 'matlab)