Skip to content

Commit 1cae438

Browse files
committed
refactor(electric): extract sh keywords the right way
1 parent bb5134d commit 1cae438

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/me-builtin.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,9 @@ Typing these will trigger reindentation of the current line.")
885885

886886
;; Electric indent at Bash/Sh keywords, extracted from the grammar
887887
(+setq-hook! (sh-mode bash-ts-mode)
888-
+electric-indent-words
889-
(delete-dups (apply #'append (mapcar (lambda (e) (list (car e) (cdr e))) (cdar sh-smie-sh-grammar)))))
888+
+electric-indent-words (seq-uniq (flatten-list (alist-get :smie-closer-alist sh-smie-sh-grammar))))
890889

891-
;; From Doom Emacs
890+
;; Inspired by Doom Emacs
892891
(add-hook
893892
'electric-indent-functions
894893
(satch-defun +electric-indent-char-fn (_c)

0 commit comments

Comments
 (0)