;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require cl-lib ring] 2) (defvar lux-keywords '("shell" "endshell" "cleanup" "timeout" "sleep" "doc" "enddoc" "doc0" "doc1" "doc2" "doc3" "doc4" "doc5" "loop" "endloop" "macro" "endmacro" "invoke")) (defvar lux-meta-commands '("my" "local" "global" "config" "include" "macro" "endshell")) (defvar lux-events '("set-line-terminator" "reset-line-terminator" "set-timestamp")) (defvar lux-config-params '("progress" "debug" "log_dir" "arch" "config_dir" "skip" "skip_unless" "timeout" "multiplier" "suite_timeout" "case_timeout" "flush_timeout" "poll_timeout" "require" "shell_wrapper" "shell_cmd" "shell_arg" "line_term" "file_pattern" "var")) (defvar lux-indent 4) (defvar lux-keywords-regexp (regexp-opt lux-keywords 'words)) (defvar lux-events-regexp (regexp-opt lux-events 'words)) (defvar lux-meta-commands-regexp (regexp-opt lux-meta-commands 'words)) (defvar lux-config-params-regexp (regexp-opt lux-config-params 'words)) (defvar lux-font-lock-keywords (byte-code "\304B \305B\n\306B \307B\310BBBB\207" [lux-keywords-regexp lux-events-regexp lux-meta-commands-regexp lux-config-params-regexp font-lock-keyword-face font-lock-builtin-face font-lock-preprocessor-face font-lock-function-name-face (("^ *-.*$" . font-lock-warning-face) ("^ *\\+.*$" . font-lock-type-face) ("\\$\\([[:alnum:]_-]+\\)" 1 font-lock-variable-name-face) ("\\${\\([[:alnum:]_-]+\\)}" 1 font-lock-variable-name-face))] 5)) (defconst lux-regexp-special-characters "[][^{}()$+*.]") #@108 Quote special characters by insert a preceding '' character in region. Region is defined by START and END. (defalias 'lux-quote-region #[(start end) "\212\305 \306\216 b\210\307 \211 \310\223\210\311\f\n\312#\205!\313\314\312\"\210\202,\207" [save-match-data-internal start end-mark end lux-regexp-special-characters match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] make-marker nil re-search-forward t replace-match "\\\\\\&"] 5 (#$ . 1587) "r"]) #@31 Indent current line in a lux. (defalias 'lux-indent-line #[nil "\306 \210o\203 \307\310!\207\311\211\312\313\314\315\316\317\n!\204&\317 !\203+\310\202\301\317!\203D\212\320y\210\310\321 Z]\322)\202y\317\f!\203y\212l\204q\204q\323y\210\317\n!\203e\310\322\202K\317\f!\204K\322\202K \204x\311)\212\204\300\320y\210\317\n!\203\222\322\211\202|\317 !\203\245\321 \\\322\211\202|\317\324!\204\265\321 \322\211\202|o\203z\322\211\203) \205\310\307 !.\207" [end-expr block-expr major-expr major-comment comment cur-indent beginning-of-line indent-line-to 0 nil "^[ ]*#" "^[ ]*##" "^[ ]*\\[\\(shell\\|cleanup\\|macro\\)" "^[ ]*\\[\\(loop\\)" "^[ ]*\\[\\(endloop\\|endmacro\\)" looking-at -1 current-indentation t 1 "^[ ]*$" done lux-indent] 8 (#$ . 2086) nil]) #@48 Open an include file or source code for macro. (defalias 'lux-find-source #[nil "\303 \211@A \304\267\202\305\n!\202\306\n!\202\307\310!+\207" [keyword-param1 keyword param1 lux-which-cmd #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("include" 15 "invoke" 21)) lux-find-file lux-find-macro error "Not a lux statement"] 3 (#$ . 2919) nil]) #@49 Return nil or command name and first parameter. (defalias 'lux-which-cmd #[nil "\212\301 \302 \210\303!\205\304\305!\304\306!B*\207" [regexp lux-build-meta-regexp beginning-of-line looking-at match-string-no-properties 1 2] 3 (#$ . 3317)]) #@135 Build lux meta statement regexp with two subexpressions: 1 - KEYWORD 2 - PARAM1 (fn &optional (KEYWORD "[^ ]+") (PARAM1 "[^] ]+")) (defalias 'lux-build-meta-regexp #[(&rest #1=#:--cl-rest--) "\203\f\211A\242\202 \303\203\211A\242\202\304\203*\305\306\307\310G\\D\"\210\311 \312\n\313\260*\207" [#1# keyword param1 "[^ ]+" "[^] ]+" signal wrong-number-of-arguments lux-build-meta-regexp 2 "[ ]*\\[\\(" "\\)[ ]+\\(" "\\)[] ]"] 5 (#$ . 3568)]) #@40 Wrapper for `find-file-existing' FILE. (defalias 'lux-find-file #[(file) "\303\304 !\305 !\306\n!\210\307\310 \"*\207" [mark file new-file copy-marker point-marker lux-expand-file find-file-existing ring-insert-at-beginning lux-window-history-ring] 3 (#$ . 4041)]) #@56 Get or create window history ring for selected window. (defalias 'lux-window-history-ring #[nil "\301 \302\303\"\206\304\303\305\306!#)\207" [window selected-window window-parameter lux-find-history-ring set-window-parameter make-ring 20] 5 (#$ . 4315)]) #@44 Unwind back from use of `lux-find-source'. (defalias 'lux-find-source-unwind #[nil "\303 \304!?\205&\305!\306 !\307\n!\203#\310\n!\210\311 !b\202%\312 *)\207" [ring marker buffer lux-window-history-ring ring-empty-p ring-remove marker-buffer buffer-live-p switch-to-buffer marker-position lux-find-source-unwind] 2 (#$ . 4581) nil]) #@24 Find MACRO definition. (defalias 'lux-find-macro #[(macro) "\303\304\"\305\306 !\206\307 !\206\310\311P!*\207" [macro macro-regexp case-fold-search lux-build-meta-regexp "macro" nil lux-search-current-buffer lux-find-external-macro error "Cannot find the lux macro "] 3 (#$ . 4928)]) #@121 Find the first match for REGEXP in the current buffer. Move point there and make an entry in `lux-window-history-ring'. (defalias 'lux-search-current-buffer #[(regexp) "\302\303 !eb\210\304 \305\306#\203\307 \210\310\311 \"\202b?)\207" [mark regexp copy-marker point-marker re-search-forward nil t beginning-of-line ring-insert-at-beginning lux-window-history-ring] 4 (#$ . 5227)]) #@44 Find external macro matching MACRO-REGEXP. (defalias 'lux-find-external-macro #[(macro-regexp) "\305 \306\307\310\311\"r\nq\210\312\216\212 \203<\204<\313 @!\314 \306\211\211\311%\210eb\210\315\f\306\311#\2033  \210 A)\202,\203Q\316!\210eb\210\315\f\306\311#\210\317 \210*\207" [found includes #1=#:temp-buffer cur-file macro-regexp lux-list-includes nil generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] lux-expand-file insert-file-contents re-search-forward lux-find-file beginning-of-line] 6 (#$ . 5622)]) #@37 Return a list of lux include files. (defalias 'lux-list-includes #[nil "\301\212eb\210\302\303\304!\301\305#\203\306\307\310!C\"\202*\207" [files nil re-search-forward lux-build-meta-regexp "include" t append match-string-no-properties 2] 4 (#$ . 6199)]) #@73 Expand environment variables in ORIG-FILE and ask user if non-existent. (defalias 'lux-expand-file #[(orig-file) "\303\304!!\305 !\306!\204\307\310\311 \312 %\202*\207" [orig-file file dir expand-file-name substitute-in-file-name file-name-directory file-exists-p read-file-name "OK? " "/" confirm-after-completion] 6 (#$ . 6468)]) (byte-code "\302\303\211\203 @\304\305\"\210 A\211\204*\303\207" [a --dolist-tail-- (("\\.lux$" . lux-mode) ("\\.luxinc$" . lux-mode)) nil add-to-list auto-mode-alist] 4) (defvar lux-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [lux-mode-hook variable-documentation put "Hook run after entering (set (make-local-variable 'mode-name) lux) mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp lux-mode-map definition-name lux-mode] 4) (defvar lux-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\317#\207" [lux-mode-abbrev-table lux-mode-map variable-documentation put purecopy "Keymap for `lux-mode'." boundp lux-mode-syntax-table definition-name lux-mode (lambda (#1=#:def-tmp-var) (defvar lux-mode-syntax-table #1#)) make-syntax-table "Syntax table for `lux-mode'." (lambda (#1#) (defvar lux-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `lux-mode'." derived-mode-parent] 5) #@235 Major-mode. Uses keymap `lux-mode-map', abbrev table `lux-mode-abbrev-table' and syntax-table `lux-mode-syntax-table'. This mode runs the hook `lux-mode-hook', as the final or penultimate step during initialization. \{lux-mode-map} (defalias 'lux-mode #[nil "\306\300!\210\307\310 \210\311\306\302!\210\312\211\313 !\210\314\f!\210 #\306\315!\210\316 \306\317!\210\320\306\321!\210\322\323\324\325\f#\210\323\326\327\f#\210\323\330\331\f#\210\332\333\334\"\210\332\335\336\"\210\306\337!\210\340)\341\342!\207" [delay-mode-hooks major-mode mode-name lux-mode-map lux-mode-syntax-table lux-mode-abbrev-table make-local-variable t kill-all-local-variables lux-mode "lux" use-local-map set-syntax-table font-lock-defaults (lux-font-lock-keywords) comment-start "#" comment-start-skip "#+\\s-*" modify-syntax-entry 35 "< b" 10 "> b" 61 "." local-set-key "\256" lux-find-source "\254" lux-find-source-unwind indent-line-function lux-indent-line run-mode-hooks lux-mode-hook local-abbrev-table] 4 (#$ . 8118) nil]) (provide 'lux-mode)