;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@34 The current version of TLC mode. (defvar tlc-version "1.3" (#$ . 87)) #@42 Display the current version of TLC mode. (defalias 'tlc-version #[nil "\301!\207" [tlc-version message] 2 (#$ . 163) nil]) (byte-code "\300\301\302\303\304\305%\210\306\307\302\310\304\301\311\312&\207" [custom-declare-group tlc nil "Major mode for editing tlc files." :group languages custom-declare-variable tlc-mode-hook "*List of functions to call on entry to TLC mode." :type hook] 8) #@35 Syntax table used in an TLC file. (defvar tlc-syntax-table nil (#$ . 561)) (byte-code "\204-\301\302 !\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\317#\210\301\207" [tlc-syntax-table make-syntax-table standard-syntax-table modify-syntax-entry 47 ". 14c" 37 ". 123" 10 ">" 34 "\"" 60 "(>" 62 ")>"] 4) #@24 Keymap for `tlc-mode'. (defvar tlc-mode-map (byte-code "\301 \302\303\304#\210\302\305\304#\210\302\306\307#\210)\207" [km make-sparse-keymap define-key " " tlc-return [return] " " tlc-indent] 4) (#$ . 925)) #@23 Face for output code. (defvar tlc-font-lock-output-code 'tlc-font-lock-output-code (#$ . 1144)) (byte-code "\300\301\302\303\304\305%\210\306\307\310\311\312\313\304\305&\207" [custom-declare-face tlc-font-lock-output-code ((((class grayscale) (background light)) (:foreground "DimGray" :underline t)) (((class grayscale) (background dark)) (:foreground "LightGray" :underline t)) (((class color) (background light)) (:foreground "DarkGreen")) (((class color) (background dark)) (:foreground "chartreuse")) (t (:underline t))) "Font Lock mode face used to highlight tlc keywords." :group tlc custom-declare-variable tlc-keywords '("CAST" "EXISTS" "FEVAL" "FILE_EXISTS" "FORMAT" "FIELDNAMES" "GETFIELD" "GENERATE" "GENERATE_FILENAME" "GENERATE_FORMATTED_VALUE" "GENERATE_FUNCTION_EXISTS" "GENERATE_TYPE" "GENERATE_TYPE_FUNCTION_EXISTS" "GET_COMMAND_SWITCH" "IDNUM" "IMAG" "INT8MAX" "INT8MIN" "INT16MAX" "INT16MIN" "INT32MAX" "INT32MIN" "ISEQUAL" "ISFIELD" "ISINF" "ISNAN" "ISFINITE" "NULL_FILE" "NUMTLCFILES" "OUTPUT_LINES" "SIZE" "STDOUT" "STRING" "STRINGOF" "SYSNAME" "TLCFILES" "TLC_TIME" "TLC_FALSE" "TLC_TRUE" "TLC_VERSION" "TYPE" "UINT8MAX" "UINT16MAX" "UINT32MAX" "UINTWHITE_SPACE" "WILL_ROLL") "Built-in function keywords to highlight in TLC." :type (repeat (string :tag "keyword"))] 8) #@50 List of keywords for nicely coloring X defaults. (defvar tlc-font-lock-keywords (byte-code "\301\302\303\304\305\306\307\310\311\312\313!\314Q\315\316E\317\257 \207" [tlc-keywords ("^%function\\s-+\\(\\sw+\\)\\s-*(" 1 font-lock-function-name-face) ("^%function\\s-+\\(\\sw+\\)\\s-*(" ("\\s-*\\(\\sw+\\)\\s-*[,)]" nil nil (1 font-lock-variable-name-face))) ("\\(?:%%\\)\\({+\\|{+[0-9]+}\\)\\s-*$" 1 'bold prepend) ("\\(?:%%\\)\\(}+\\)\\s-*$" 1 'bold prepend) ("\\(^[ ]*\\([^ \n %]\\|%<\\)[^\n]*\\)$" 1 tlc-font-lock-output-code append) ("\\(^\\|\\s-\\)\\(%[^% (\n>]+\\)\\>" 2 font-lock-keyword-face) ("%assign\\s-+:*\\([_a-zA-Z0-9.]+\\)\\s-*\\($\\|=\\)" 1 font-lock-variable-name-face) ("%\\(exit\\|warning\\|error\\|trace\\) \\([^\n]+\\)$" 2 font-lock-string-face prepend) ("\\(%<[^%\n>]+>\\)" 1 font-lock-reference-face prepend) "\\<\\(" regexp-opt "\\)\\>" 1 font-lock-type-face ("[^.]\\(\\.\\.\\.\\)$" 1 'underline prepend)] 12) (#$ . 2445)) (defvar tlc-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [tlc-mode-hook variable-documentation put "Hook run after entering TLC mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp tlc-mode-map definition-name tlc-mode] 4) (defvar tlc-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" [tlc-mode-abbrev-table tlc-mode-map variable-documentation put purecopy "Keymap for `tlc-mode'." boundp tlc-mode-syntax-table definition-name tlc-mode (lambda (def-tmp-var) (defvar tlc-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `tlc-mode'." (lambda (def-tmp-var) (defvar tlc-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `tlc-mode'." derived-mode-parent prog-mode] 5) #@466 Major mode derived from `prog-mode' by `define-derived-mode'. It inherits all of the parent's attributes, but has its own keymap, abbrev table and syntax table: `tlc-mode-map', `tlc-mode-abbrev-table' and `tlc-mode-syntax-table' which more-or-less shadow prog-mode's corresponding tables. In addition to any hooks its parent mode might have run, this mode runs the hook `tlc-mode-hook', as the final or penultimate step during initialization. \{tlc-mode-map} (defalias 'tlc-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2036 \321 =\203<\322\f\323 \"\210)\324(\325\"\204V()=\204V\326(\325)C#\210\327 !\210\330\f!\210()\331 \210\311\312\327 !\210\330*!\210\306\332!\210\306\333!\210\306\334!\210\335\336\337\306\340!\210\341 \306\342!\210\343\"\344 \210\212eb\210\345\346!\210*\347\346!\207" [delay-mode-hooks major-mode mode-name tlc-mode-map tlc-mode-syntax-table parent make-local-variable t prog-mode tlc-mode "TLC" 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 comment-start comment-end comment-start-skip "%% " "" "%%\\|/%" indent-line-function tlc-indent font-lock-defaults ((tlc-font-lock-keywords) nil nil ((95 . "w"))) tlc-version run-hooks tlc-mode-hook run-mode-hooks tlc-mode-abbrev-table local-abbrev-table tlc-syntax-table] 6 (#$ . 4512) nil]) #@39 Handle carriage return in `tlc-mode'. (defalias 'tlc-return #[nil "\300 \210\301 \210\302 \207" [delete-horizontal-space newline tlc-indent] 1 (#$ . 6081) nil]) #@66 Indent the current line to the indentation of the previous line. (defalias 'tlc-indent #[nil "\303\211\212\214\304 \305 * U\203!i W\205=\306 \\b\202=\214i\307 \210\310 \210j\210\n V\205<\306 \\\n Z\\b**\207" [new-indent curr-indent curr-column nil current-indentation tlc--calc-indentation line-beginning-position beginning-of-line delete-horizontal-space] 3 (#$ . 6248) nil]) (defvar tlc--indent-because-of-continuation nil) #@41 Calculate the indentation of this line. (defalias 'tlc--calc-indentation #[nil "\304 \210\305\306!\203\307 \204\310\207\305\311!\203\307 \204\312\202D\305\313!\203.\307 \204.\314\202D\305\315!\203C\307 \204C\312\316\225\316\224Z_\202D\310\305\317!\205M\307 ?\305\320!\205U\307 \321o\203c\322 \202\263\212\323 !\210o\203t\n\324 \\\202\261\203\205\305\325!\203\205\322 T\202\261 \203\217\322 \202\261\322 \203\243\310\nV\204\237 \203\243\n\202\247\n\324 \\\\\211\310W\203\261\310\n)+\207" [percent-in-multiline-comment is-tlc-if-part i-col tlc--indent-because-of-continuation beginning-of-line looking-at "\\s-*%%{[0-9]+}\\s-*$" tlc--in-multiline-comment 0 "\\s-*\\(?:\\(?:\\(?:%end\\(switch\\|roll\\|with\\|for\\|foreach\\|while\\|function\\)\\)\\>\\)\\|}\\)" -4 "\\s-*\\(%case\\|%default\\)\\>" -2 "\\s-*%%\\(}+\\)\\s-*$" 1 "\\s-*%\\(?:else\\|elseif\\|endif\\)" "\\s-*%" nil current-indentation tlc--indent-move-up tlc--calc-next-indentation "\\s-*/%"] 5 (#$ . 6693)]) #@193 Move to first prior non-blank line or matching %if, %else, %endif when IS-TLC-IF-PART is t. Specify IS-TLC-IF-PART as t, if current line is %else, %elsif, %endif to align the %if statements. (defalias 'tlc--indent-move-up #[(is-tlc-if-part) "\303\304?\205S\305y\210\306 \210o\204\307\310!\203\305y\210\202o\204M\n\203M\307\311!\2033 T\202 \303V\203E\307\312!\203 S\202\307\313!\211\202\314\211\202*\207" [done n-if-statements-to-skip is-tlc-if-part 0 nil -1 beginning-of-line looking-at "^\\s-*$" "\\s-*%endif\\>" "\\s-*%if\\>" "\\s-*%\\(?:if\\|elseif\\|else\\)\\>" t] 3 (#$ . 7711)]) #@68 Calculate indentation for the next line based on the current line. (defalias 'tlc--calc-next-indentation #[nil "\301\302!\203)\303 \204)\301\304!\203\305\306\225\306\224Z_\207\301\307!\203'\310\306\224\306\225{!\207\311\207\212\312 \2042\313 \210\301\314!\203D\301\315!\204D\303 ?\206L\301\316!\205L\303 )\203T\305\202\333\212\312 \204]\313 \210\301\317!)\203m\303 \204m\320\202\333\301\321!\203\211\303 \203\211\322 \320\246\306U\203\205\323\202\333\311\202\333\312 \203\243\212\323y\210\312 )\204\243\303 \204\243\324\305\202\333\212\325\210\326\327\330 \324#\210i\311V\203\312\301\331!\203\312\323u\210\301\332!\203\312\326\327\330 \324#\210\301\333!)\203\332\303 \204\332\305\202\333\311\334 \204\370\312 \204\370\212\323y\210\312 )\203\370\303 \204\370\335\202\371\311\\\207" [tlc--indent-because-of-continuation looking-at "\\s-*%%" tlc--in-multiline-comment "\\s-*%%\\({+\\)\\s-*$" 4 1 "\\s-*%%{\\([0-9]+\\)}\\s-*$" string-to-number 0 tlc--assignment-continuation-p tlc--beginning-of-statement "\\s-*%\\(?:switch\\|roll\\|with\\|if\\|for\\|foreach\\|while\\|else\\|elseif\\|function\\)\\>" "\\s-*%if\\s-+\\(?:EXISTS(\"?\\(?:::\\)?_[A-Z_0-9]+_\"?)\\s-*==\\s-*\\(?:0\\|TLC_FALSE\\)\\|!EXISTS(\"?\\(?:::\\)?_[A-Z_0-9]+_\"?)\\)" "\\s-*/%" "\\s-*%\\(?:case\\|default\\)\\>" 2 "\\s-*%/" current-indentation -1 t nil re-search-backward "[^[:space:]]" line-beginning-position "\\\\" "\\s-" "{" tlc--line-special -4] 4 (#$ . 8331)]) #@70 Goto the beginning of a statement, skipping over continuation lines. (defalias 'tlc--beginning-of-statement #[nil "\300 \210\212\301y\210\302 )\205 \301y\210\302 \203\301y\210\202\303y\210\300 \207" [beginning-of-line -1 tlc--assignment-continuation-p 1] 1 (#$ . 9806)]) #@58 Return t if the current line is a special language line. (defalias 'tlc--line-special #[nil "\212\301 \302\216\303 \210\304\305!+\207" [save-match-data-internal match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] beginning-of-line looking-at "\\s-*\\(?:%[^<]\\|}\\)"] 2 (#$ . 10088)]) #@47 See if continuation lines should be indented. (defalias 'tlc--assignment-continuation-p #[nil "\212\300\210i\301V\205\302u\210\303\304!)\207" [nil 2 -3 looking-at "\\.\\.\\."] 2 (#$ . 10418)]) #@41 Return t we are in a multiline comment. (defalias 'tlc--in-multiline-comment #[nil "\300\301 8\207" [4 syntax-ppss] 2 (#$ . 10620)]) (byte-code "\300\301\302\"\210\303\304!\207" [add-to-list auto-mode-alist ("\\.tlc\\'" . tlc-mode) provide tlc] 3)