1
- ; ;; json-mode.el --- Major mode for editing JSON files.
1
+ ; ;; json-mode.el --- Major mode for editing JSON files
2
2
3
3
; ; Copyright (C) 2011-2014 Josh Johnston
4
4
@@ -61,13 +61,10 @@ Return the new `auto-mode-alist' entry"
61
61
new-entry))
62
62
63
63
;;;### autoload
64
- (defcustom json-mode-auto-mode-list '(
65
- " .babelrc"
64
+ (defcustom json-mode-auto-mode-list '(" .babelrc"
66
65
" .bowerrc"
67
- " composer.lock"
68
- )
69
- " List of filename as string to pass for the JSON entry of
70
- `auto-mode-alist' .
66
+ " composer.lock" )
67
+ " List of filenames to pass for the JSON entry of `auto-mode-alist' .
71
68
72
69
Note however that custom `json-mode' entries in `auto-mode-alist'
73
70
won’t be affected."
@@ -111,13 +108,12 @@ This function calls `json-mode--update-auto-mode' to change the
111
108
(list json-mode-quoted-key-re 1 font-lock-keyword-face )
112
109
(list json-mode-quoted-string-re 1 font-lock-string-face )
113
110
(list json-mode-keyword-re 1 font-lock-constant-face )
114
- (list json-mode-number-re 1 font-lock-constant-face )
115
- )
111
+ (list json-mode-number-re 1 font-lock-constant-face ))
116
112
" Level one font lock." )
117
113
118
114
;;;### autoload
119
115
(define-derived-mode json-mode javascript-mode " JSON"
120
- " Major mode for editing JSON files"
116
+ " Major mode for editing JSON files. "
121
117
(setq font-lock-defaults '(json-font-lock-keywords-1 t )))
122
118
123
119
; ; Well formatted JSON files almost always begin with “{” or “[”.
@@ -126,14 +122,15 @@ This function calls `json-mode--update-auto-mode' to change the
126
122
127
123
;;;### autoload
128
124
(defun json-mode-show-path ()
129
- " Print the path to the node at point to the minibuffer, and yank to the kill ring ."
125
+ " Print the path to the node at point to the minibuffer."
130
126
(interactive )
131
127
(message (jsons-print-path)))
132
128
133
129
(define-key json-mode-map (kbd " C-c C-p" ) 'json-mode-show-path )
134
130
135
131
;;;### autoload
136
132
(defun json-mode-kill-path ()
133
+ " Add the path to the node at point to the kill ring."
137
134
(interactive )
138
135
(kill-new (jsons-print-path)))
139
136
0 commit comments