summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-26 15:27:50 -0500
committerCase Duckworth2021-04-26 15:27:50 -0500
commit1032b2cbd99208a097d2660a2ffe3147faaeee2c (patch)
treea2f9ea602809f1e2994778f3ec79ae256dfbef4d
parentAdd `acdw/insert-iso-date' (diff)
downloademacs-1032b2cbd99208a097d2660a2ffe3147faaeee2c.tar.gz
emacs-1032b2cbd99208a097d2660a2ffe3147faaeee2c.zip
Change `:mode' to `:file-match'
Turns out setup.el has a local macro to deal with setting up modes.
-rw-r--r--init.el28
1 files changed, 11 insertions, 17 deletions
diff --git a/init.el b/init.el index 3ff41b4..7af2e3e 100644 --- a/init.el +++ b/init.el
@@ -49,12 +49,6 @@
49 :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map." 49 :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map."
50 :repeatable t) 50 :repeatable t)
51 51
52(setup-define :mode
53 (lambda (ext)
54 `(add-to-list 'auto-mode-alist (cons ,ext setup-mode)))
55 :documentation "Add SETUP-MODE to `auto-mode-alist' for EXTENSION."
56 :repeatable t)
57
58;;; `no-littering' 52;;; `no-littering'
59(setup (:straight no-littering) 53(setup (:straight no-littering)
60 (:option no-littering-etc-directory (acdw/dir) 54 (:option no-littering-etc-directory (acdw/dir)
@@ -495,7 +489,7 @@
495(setup (:straight (gemini-mode 489(setup (:straight (gemini-mode
496 :host nil 490 :host nil
497 :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) 491 :repo "https://git.carcosa.net/jmcbray/gemini.el.git"))
498 (:mode "\\.\\(gemini\\|gmi\\)\\'")) 492 (:file-match "\\.\\(gemini\\|gmi\\)\\'"))
499 493
500(setup dired 494(setup dired
501 (setq-default dired-recursive-copies 'always 495 (setq-default dired-recursive-copies 'always
@@ -549,7 +543,7 @@
549 543
550(setup (:straight nov) 544(setup (:straight nov)
551 (:option nov-text-width fill-column) 545 (:option nov-text-width fill-column)
552 (:mode "\\.epub\\'")) 546 (:file-match "\\.epub\\'"))
553 547
554(setup gnus 548(setup gnus
555 (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) 549 (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory)
@@ -909,10 +903,10 @@ if ripgrep is installed, otherwise `consult-grep'."
909(when (executable-find "fennel") 903(when (executable-find "fennel")
910 (setup (:straight fennel-mode) 904 (setup (:straight fennel-mode)
911 (autoload 'fennel-repl "fennel-mode" nil t) 905 (autoload 'fennel-repl "fennel-mode" nil t)
912 (:mode "\\.fnl\\'"))) 906 (:file-match "\\.fnl\\'")))
913 907
914(setup (:straight lua-mode) 908(setup (:straight lua-mode)
915 (:mode "\\.lua\\'")) 909 (:file-match "\\.lua\\'"))
916 910
917(setup sh-mode 911(setup sh-mode
918 (:option sh-basic-offset tab-width 912 (:option sh-basic-offset tab-width
@@ -935,13 +929,13 @@ if ripgrep is installed, otherwise `consult-grep'."
935 (:option css-level-offset 2 929 (:option css-level-offset 2
936 js-indent-level 2 930 js-indent-level 2
937 sgml-indent-offset 2) 931 sgml-indent-offset 2)
938 (:mode "\\.\\(p\\|dj\\)?html\\'" 932 (:file-match "\\.\\(p\\|dj\\)?html\\'"
939 "\\.html?\\'" 933 "\\.html?\\'"
940 "\\.\\(tpl\\.\\)?php\\'" 934 "\\.\\(tpl\\.\\)?php\\'"
941 "\\.[agj]sp\\'" 935 "\\.[agj]sp\\'"
942 "\\.as[cp]x\\'" 936 "\\.as[cp]x\\'"
943 "\\.erb\\'" 937 "\\.erb\\'"
944 "\\.mustache\\'")) 938 "\\.mustache\\'"))
945 939
946(when (locate-library "gforth") 940(when (locate-library "gforth")
947 (autoload 'forth-mode "gforth") 941 (autoload 'forth-mode "gforth")