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:
parent
1fad466c12
commit
ebf91a1363
5 changed files with 5 additions and 5 deletions
|
@ -55,7 +55,7 @@
|
||||||
;; The `.for' extension is automatically recognized by Emacs and invokes
|
;; The `.for' extension is automatically recognized by Emacs and invokes
|
||||||
;; `fortran-mode', but not its capital variant `.FOR'. Many old files are
|
;; `fortran-mode', but not its capital variant `.FOR'. Many old files are
|
||||||
;; named the latter way, so we account for that manually here.
|
;; named the latter way, so we account for that manually here.
|
||||||
:mode ("\\.FOR$" . fortran-mode)
|
:mode ("\\.FOR\\'" . fortran-mode)
|
||||||
:config
|
:config
|
||||||
;; Or else Flycheck will get very mad.
|
;; Or else Flycheck will get very mad.
|
||||||
(setq flycheck-gfortran-language-standard "legacy")
|
(setq flycheck-gfortran-language-standard "legacy")
|
||||||
|
|
|
@ -47,7 +47,7 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
|
||||||
|
|
||||||
|
|
||||||
(use-package! groovy-mode
|
(use-package! groovy-mode
|
||||||
:mode "\\.g\\(?:radle\\|roovy\\)$"
|
:mode "\\.g\\(?:radle\\|roovy\\)\\'"
|
||||||
:config
|
:config
|
||||||
(set-docsets! 'groovy-mode "Groovy" "Groovy_JDK")
|
(set-docsets! 'groovy-mode "Groovy" "Groovy_JDK")
|
||||||
(set-eval-handler! 'groovy-mode "groovy")
|
(set-eval-handler! 'groovy-mode "groovy")
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
|
|
||||||
(use-package! hack-mode
|
(use-package! hack-mode
|
||||||
:when (modulep! +hack)
|
:when (modulep! +hack)
|
||||||
:mode "\\.hh$")
|
:mode "\\.hh\\'")
|
||||||
|
|
||||||
|
|
||||||
(use-package! composer
|
(use-package! composer
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
;;; Packages
|
;;; Packages
|
||||||
|
|
||||||
(use-package! rustic
|
(use-package! rustic
|
||||||
:mode ("\\.rs$" . rustic-mode)
|
:mode ("\\.rs\\'" . rustic-mode)
|
||||||
:preface
|
:preface
|
||||||
;; HACK `rustic' sets up some things too early. I'd rather disable it and let
|
;; HACK `rustic' sets up some things too early. I'd rather disable it and let
|
||||||
;; our respective modules standardize how they're initialized.
|
;; our respective modules standardize how they're initialized.
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
|
|
||||||
(use-package! jinja2-mode
|
(use-package! jinja2-mode
|
||||||
:mode "\\.j2$"
|
:mode "\\.j2\\'"
|
||||||
:config
|
:config
|
||||||
;; The default behavior is to reindent the whole buffer on save. This is
|
;; The default behavior is to reindent the whole buffer on save. This is
|
||||||
;; disruptive and imposing. There are indentation commands available; the user
|
;; disruptive and imposing. There are indentation commands available; the user
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue