From b78b112dd0436d1e9f3813bba76a0af79a265a55 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 15 Apr 2020 00:38:18 -0400 Subject: Some tweaks to how dictionaries and rows work. --- lux-mode/lux-mode.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lux-mode') diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index 26b31f03c..47a90d0bb 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -361,6 +361,9 @@ 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. @@ -416,8 +419,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 "with-" function) - (string-match ":\\'" function)))) + (or (string-match withRE function) + (string-match definitionRE function)))) (lisp-indent-defform state indent-point)) ((integerp method) (lisp-indent-specform method state -- cgit v1.2.3