refactor: use true eos regex in auto-mode-alist entries

"\\'" will match the true end-of-string, whereas "$" will also match
just before a newline character. Not that there's much risk that
there'll be newlines in a filepath, but I'd rather be consistent. It
also makes these entries easier for users to remove from
auto-mode-alist.
This commit is contained in:
Henrik Lissner 2024-08-25 16:13:09 -04:00
parent 1fad466c12
commit ebf91a1363
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
5 changed files with 5 additions and 5 deletions

View file

@ -55,7 +55,7 @@
;; The `.for' extension is automatically recognized by Emacs and invokes
;; `fortran-mode', but not its capital variant `.FOR'. Many old files are
;; named the latter way, so we account for that manually here.
:mode ("\\.FOR$" . fortran-mode)
:mode ("\\.FOR\\'" . fortran-mode)
:config
;; Or else Flycheck will get very mad.
(setq flycheck-gfortran-language-standard "legacy")

View file

@ -47,7 +47,7 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
(use-package! groovy-mode
:mode "\\.g\\(?:radle\\|roovy\\)$"
:mode "\\.g\\(?:radle\\|roovy\\)\\'"
:config
(set-docsets! 'groovy-mode "Groovy" "Groovy_JDK")
(set-eval-handler! 'groovy-mode "groovy")

View file

@ -118,7 +118,7 @@
(use-package! hack-mode
:when (modulep! +hack)
:mode "\\.hh$")
:mode "\\.hh\\'")
(use-package! composer

View file

@ -9,7 +9,7 @@
;;; Packages
(use-package! rustic
:mode ("\\.rs$" . rustic-mode)
:mode ("\\.rs\\'" . rustic-mode)
:preface
;; HACK `rustic' sets up some things too early. I'd rather disable it and let
;; our respective modules standardize how they're initialized.