diff options
author | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
commit | 7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch) | |
tree | bd1c865dea0902790f3e462cec4f9bc8d8ae428f /lux-mode | |
parent | fc2737b5226eda69c12bc593e83e22ed54e4d3af (diff) |
First-class programs instead of having a "lux program" extension.
Diffstat (limited to 'lux-mode')
-rw-r--r-- | lux-mode/lux-mode.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index c2c3294d0..90ced20ed 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -392,12 +392,12 @@ Called by `imenu--generic-function'." (alternative-format (altRE "char" "bin" "oct" "hex")) (documentation (altRE "comment")) (function-application (altRE "|>" "<|" "left" "right" "all")) - (function-definition (altRE "function" "|>>" "<<|")) + (function-definition (altRE "function" "|>>" "<<|" + "program")) (remember (altRE "remember" "to_do" "fix_me")) (extension (altRE "analysis" "synthesis" "generation" "declaration")) (definition (altRE "\\.require" - "def" "inlined" "type" "program:" - "macro" "syntax" + "def" "inlined" "type" "exception"))) (let ((control (altRE control//flow control//pattern-matching @@ -495,7 +495,6 @@ highlighted region)." (font-lock-syntactic-face-function . lux-font-lock-syntactic-face-function)))) (defvar withRE (concat "\\`" "with" (altRE "_" "\\'"))) -(defvar definitionRE ":\\'") (defun lux-indent-function (indent-point state) "When indenting a line within a function call, indent properly. @@ -553,8 +552,7 @@ This function also returns nil meaning don't specify the indentation." ((or (eq method 'defun) (and (null method) (> (length function) 2) - (or (string-match withRE function-tail) - (string-match definitionRE function-tail)))) + (string-match withRE function-tail))) (lisp-indent-defform state indent-point)) ((integerp method) (lisp-indent-specform method state @@ -582,6 +580,7 @@ This function also returns nil meaning don't specify the indentation." ("syntax" 'defun) ("template" 'defun) ("polytypic" 'defun) + ("program" 'defun) ("def" 'defun) ("type" 'defun) |