From 76d52ffcabf4ac46473d953ddcbbd5a762f8c1c1 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 25 Aug 2021 23:06:37 -0500 Subject: [PATCH] Fix weird `setup' bug with `:file-match' --- init.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/init.el b/init.el index 799e1db..4992104 100644 --- a/init.el +++ b/init.el @@ -1316,7 +1316,7 @@ successive invocations." (setup (:straight fennel-mode) (:needs "fennel") (autoload 'fennel-repl "fennel-mode" nil t) - (:file-match "\\.fnl\\'")) + (add-to-list 'auto-mode-alist '("\\.fnl\\'" . fennel-mode))) (setup (:straight gcmh) (:option gcmh-idle-delay 'auto) @@ -1327,7 +1327,7 @@ successive invocations." (setup (:straight (gemini-mode :host nil :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) - (:file-match "\\.\\(gemini\\|gmi\\)\\'") + (add-to-list 'auto-mode-alist '("\\.\\(gemini\\|gmi\\)\\'" . gemini-mode)) (:hook turn-off-auto-fill)) (setup gforth @@ -1371,7 +1371,7 @@ successive invocations." (:needs "ledger")) (setup (:straight lua-mode) - (:file-match "\\.lua\\'")) + (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-mode))) (setup (:straight magit) (:global "C-c g" magit-status) @@ -1417,7 +1417,7 @@ successive invocations." (setup (:straight nov) (:option nov-text-width fill-column) - (:file-match "\\.epub\\'")) + (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))) (setup (:straight package-lint)) @@ -1768,13 +1768,14 @@ successive invocations." (:option css-level-offset 2 js-indent-level 2 sgml-indent-offset 2) - (:file-match "\\.\\(p\\|dj\\)?html\\'" - "\\.html?\\'" - "\\.\\(tpl\\.\\)?php\\'" - "\\.[agj]sp\\'" - "\\.as[cp]x\\'" - "\\.erb\\'" - "\\.mustache\\'")) + (dolist (ext '("\\.\\(p\\|dj\\)?html\\'" + "\\.html?\\'" + "\\.\\(tpl\\.\\)?php\\'" + "\\.[agj]sp\\'" + "\\.as[cp]x\\'" + "\\.erb\\'" + "\\.mustache\\'")) + (add-to-list 'auto-mode-alist `(,ext . web-mode)))) (setup (:straight which-key) (:option which-key-show-early-on-C-h t