;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require matlab tempo] 2) #@40 List of templates used in MATLAB mode. (defvar matlab-tempo-tags nil (#$ . 153)) #@58 Keymap used for inserting simple texts based on context. (defvar matlab-insert-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\302\327\330#\210)\207" [km make-sparse-keymap define-key "c" matlab-insert-next-case "e" matlab-insert-end-block "i" tempo-template-matlab-if "I" tempo-template-matlab-if-else "f" tempo-template-matlab-for "s" tempo-template-matlab-switch "t" tempo-template-matlab-try "w" tempo-template-matlab-while "F" tempo-template-matlab-function "'" matlab-stringify-region "" matlab-ispell-strings-and-comments] 4) (#$ . 240)) #@36 Keymap for C-c C-c in matlab-mode. (defvar matlab-insert-map-fcn nil (#$ . 949)) (byte-code "\301\211M\210\302\303\304\305#\207" [matlab-insert-map matlab-insert-map-fcn add-hook matlab-mode-hook matlab-cgen-hook-fcn t] 4) #@57 Hook run in `matlab-mode-hook' needed for cgen support. (defalias 'matlab-cgen-hook-fcn #[nil "\302\301!\210\303 \"\211\207" [matlab-tempo-tags tempo-local-tags make-local-variable append] 3 (#$ . 1180)]) (byte-code "\303 \304\211\203! @rq\210\n\305=\203\306 \210) A\211\204 *\304\207" [B --dolist-tail-- major-mode buffer-list nil matlab-mode matlab-cgen-hook-fcn] 3) #@134 Insert and END block based on the current syntax. Optional argument REINDENT indicates if the specified block should be re-indented. (defalias 'matlab-insert-end-block #[(&optional reindent) "\304\305!\211@)\306=\204\307\210\310c\210\311\307\212\31214\313\311!\210`\314`\212\315\316\307\311#\210`)\"\2110\210\2027\210\307)\n\204B\317\320!\202[\321c\210\n;\203O\322\n\261\210\323 \210 \205[\324 `\307#*\207" [lvl1 begin valid reindent matlab-compute-line-context 1 empty nil "\n" t (error) matlab-backward-sexp buffer-substring-no-properties re-search-forward "[\n,;.]" error "No block to end" "end" " % " matlab-indent-line indent-region] 7 (#$ . 1567) "P"]) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\311\305%\210\300\312\313\314\315\305%\210\300\316\317\314\315\305%\210\300\320\321\322\323\305%\210\300\324\325\326\327\305%\207" [tempo-define-template "matlab-for" ("for " p "=" p "," > n> r> & "end" > %) "for" "Insert a MATLAB for statement" matlab-tempo-tags "matlab-while" ("while (" p ")," > n> r> & "end" > %) "while" "Insert a MATLAB while statement" "matlab-if" ("if " p > n r> "end" > n) "if" "Insert a MATLAB if statement" "matlab-if-else" ("if " p > n r> "else" > n "end" > n) "matlab-try" ("try " > n r> "catch" > n p > n "end" > n) "try" "Insert a MATLAB try catch statement" "matlab-switch" ("switch " p > n "otherwise" > n r> "end" > n) "switch" "Insert a MATLAB switch statement with region in the otherwise clause."] 6) #@55 Insert a case statement inside this switch statement. (defalias 'matlab-insert-next-case #[nil "\302\212\3031\304\302!\210\305\306!\2110\210\202\210\307)\204!\310\311!\210)\312\313!\211@)\314=\2044\307\210\315c\210\316j\210\317c\210\320 \207" [valid lvl1 t (error) matlab-backward-sexp looking-at "switch" nil error "Not in a switch statement" matlab-compute-line-context 1 empty "\n" 0 "case " matlab-indent-line] 3 (#$ . 3044) nil]) (tempo-define-template "matlab-function" '("function " (P "output argument(s): " output t) (if (string-match "," (tempo-lookup-named 'output)) '(l "[" (s output) "]") '(l (s output))) (if (= 0 (length (tempo-lookup-named 'output))) nil " = ") (if (= 1 (count-lines 1 (point))) (tempo-save-named 'fname (file-name-nondirectory (file-name-sans-extension (buffer-file-name)))) '(l (P "function name: " fname t))) (tempo-lookup-named 'fname) "(" (P "input argument(s): ") ")" n "% " (upcase (tempo-lookup-named 'fname)) " - " (P "H1 line: ") n "% " p n (if matlab-functions-have-end '(l "end" n))) "function" "Insert a MATLAB function statement" 'matlab-tempo-tags) #@268 Put MATLAB 's around region, and quote all quotes in the string. Stringification allows you to type in normal MATLAB code, mark it, and then turn it into a MATLAB string that will output exactly what's in the region. BEGIN and END mark the region to be stringified. (defalias 'matlab-stringify-region #[(begin end) "\212b\210\303\304 \305#\203\306\307!\210\310 \211 \311\223\210b\210\312c\210\303\312\n\305#\203,\312c\210\202\nb\210\312c*\207" [begin end m re-search-forward "\n" t error "You may only stringify regions that encompass less than one line" make-marker nil "'"] 5 (#$ . 4162) "r"]) #@99 Spell check valid strings in region with Ispell. Argument BEGIN and END mark the region boundary. (defalias 'matlab-ispell-strings-and-comments-region #[(begin end) "\301\302!\210\303\304!\210\212b)\207" [begin error "This function needs to be reimplemented." require ispell] 2 (#$ . 4773) "r"]) #@99 Spell check valid strings in the current buffer with Ispell. Calls `matlab-ispell-strings-region' (defalias 'matlab-ispell-strings-and-comments #[nil "\300ed\"\207" [matlab-ispell-strings-and-comments-region] 3 (#$ . 5076) nil]) #@123 Convert a MATLAB M file into a Latex document for printing. Author: Uwe Brauer oub@eucmos.sim.ucm.es Created: 14 Feb 2002 (defalias 'matlab-generate-latex #[nil "\214\212eb\210\300c\210\301 \210db\210\302c\210~\210*\303\304!\210\305 \210\303\304!\207" ["\\documentclass[12pt]{report}\n\n\\usepackage{listings}\n\\lstloadlanguages{Matlab}\n\\lstset{language=Matlab,keywordstyle=\\bfseries,labelstep=1,escapechar=\\#}\n\\begin{document}\n\\begin{lstlisting}{}" newline "\n\\end{lstlisting}\n\\end{document}" font-lock-mode nil LaTeX-mode] 2 (#$ . 5312) "*"]) (provide 'matlab-cgen)