From 7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 9 Jul 2022 14:35:38 -0400 Subject: First-class programs instead of having a "lux program" extension. --- lux-mode/lux-mode.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lux-mode/lux-mode.el') 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) -- cgit v1.2.3