aboutsummaryrefslogtreecommitdiff
path: root/lux-mode
diff options
context:
space:
mode:
authorEduardo Julian2021-09-14 16:57:24 -0400
committerEduardo Julian2021-09-14 16:57:24 -0400
commit02b954dc0d93cd9132a6a1c758239e6a144e642b (patch)
treee47c5dca7c1addf0fae379277af558ba61044bc2 /lux-mode
parentccfa75463cd7c702f41c3dae5cbdaeade7ba5c31 (diff)
Got lux-mode/paredit-mode to treat the semi-colon (;) like a normal character.
Diffstat (limited to 'lux-mode')
-rw-r--r--lux-mode/lux-mode.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el
index b7a5b1c71..3bbccce88 100644
--- a/lux-mode/lux-mode.el
+++ b/lux-mode/lux-mode.el
@@ -220,14 +220,23 @@ ENDP and DELIM."
(funcall self argument))))
)
+(defun lux/insert_semicolon ()
+ "Just write a ; in the buffer."
+ (interactive)
+ (insert-char ?\;))
+
(defun lux-paredit-setup ()
"Make \"paredit-mode\" play nice with `lux-mode'."
(when (>= paredit-version 21)
+ ;; Extend
(define-key lux-mode-map "{" #'paredit-open-curly)
(define-key lux-mode-map "}" #'paredit-close-curly)
- (add-to-list 'paredit-space-for-delimiter-predicates
+ (add-to-list 'paredit-space-for-delimiter-predicates
#'lux-space-for-delimiter-p)
(lux-enable-paredit-backslash)
+ ;; Re-bind
+ (define-key lux-mode-map
+ [remap paredit-semicolon] #'lux/insert_semicolon)
))
(defun indent_lux_line! (&optional indent)