Skip to content

Commit 22a2936

Browse files
authored
Add some common files to auto-load-alist
It would be nice if some of these commonly used files were recognized by default as `json-mode` files. If people find more they can stick them to the list. Right now I use ``` (use-package json-mode :mode (rx (or ".babelrc" ".bowerrc") eos)) ``` but I figured this is general enough to be included in the package itself.
1 parent e8ba0c0 commit 22a2936

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

json-mode.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@
6969
(add-to-list 'auto-mode-alist '("\\.json$" . json-mode))
7070
;;;###autoload
7171
(add-to-list 'auto-mode-alist '("\\.jsonld$" . json-mode))
72+
;;;###autoload
73+
(add-to-list 'auto-mode-alist (cons (rx (or
74+
".babelrc"
75+
".bowerrc"
76+
) eos)
77+
'json-mode))
7278

7379
;;;###autoload
7480
(defun json-mode-show-path ()

0 commit comments

Comments
 (0)