aboutsummaryrefslogtreecommitdiff
path: root/lux-mode
diff options
context:
space:
mode:
authorEduardo Julian2020-04-15 20:54:02 -0400
committerEduardo Julian2020-04-15 20:54:02 -0400
commit4f1553c6f6bb579f09749d5b9ca955c43a7440a4 (patch)
tree89dcb7bee09433ddf6cb3b77c9b01e07bb743e3d /lux-mode
parentb78b112dd0436d1e9f3813bba76a0af79a265a55 (diff)
Test for concatenative programming.
Diffstat (limited to 'lux-mode')
-rw-r--r--lux-mode/lux-mode.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el
index 47a90d0bb..e3dfd46f6 100644
--- a/lux-mode/lux-mode.el
+++ b/lux-mode/lux-mode.el
@@ -267,7 +267,8 @@ Called by `imenu--generic-function'."
(jvm-host (altRE "class:" "interface:" "import:" "object" "do-to" "synchronized" "class-for"))
(alternative-format (altRE "char" "bin" "oct" "hex"))
(documentation (altRE "doc" "comment"))
- (function-application (altRE "|>" "|>>" "<|" "<<|" "_\\$" "\\$_"))
+ (function-application (altRE "|>" "<|" "_\\$" "\\$_"))
+ (function-definition (altRE "function" "|>>" "<<|" "||>"))
(remember (altRE "remember" "to-do" "fix-me"))
(definition (altRE "\\.module:"
"def:" "type:" "program:"
@@ -307,11 +308,12 @@ Called by `imenu--generic-function'."
alternative-format
documentation
function-application
+ function-definition
remember
definition
;;;;;;;;;;;;;;;;;;;;;;;;
"with-expansions"
- "function" "undefined" "name-of" "static"
+ "undefined" "name-of" "static"
"for"
"io"
"infix"
@@ -361,7 +363,7 @@ highlighted region)."
(font-lock-syntactic-face-function
. lux-font-lock-syntactic-face-function))))
-(defvar withRE (concat "with" (altRE "-" "\\'")))
+(defvar withRE (concat "\\`" "with" (altRE "-" "\\'")))
(defvar definitionRE ":\\'")
(defun lux-indent-function (indent-point state)
@@ -419,8 +421,8 @@ 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)
- (string-match definitionRE function))))
+ (or (string-match withRE function-tail)
+ (string-match definitionRE function-tail))))
(lisp-indent-defform state indent-point))
((integerp method)
(lisp-indent-specform method state