Skip to content

Commit bfd1557

Browse files
committed
Fix patterns of skip-chars-backward
1 parent b1b56c3 commit bfd1557

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

json-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ If the region is not active, beautify the entire buffer ."
272272
((setq symbol (bounds-of-thing-at-point 'symbol))
273273
(cond
274274
((looking-at-p "null"))
275-
((save-excursion (skip-chars-backward "[-0-9.]") (looking-at json-mode-number-re))
275+
((save-excursion (skip-chars-backward "-0-9.") (looking-at json-mode-number-re))
276276
(kill-region (match-beginning 0) (match-end 0))
277277
(insert "null"))
278278
(t (kill-region (car symbol) (cdr symbol)) (insert "null"))))
@@ -287,7 +287,7 @@ If the region is not active, beautify the entire buffer ."
287287
(defun json-increment-number-at-point (&optional delta)
288288
"Add DELTA to the number at point; DELTA defaults to 1."
289289
(interactive "P")
290-
(when (save-excursion (skip-chars-backward "[-0-9.]") (looking-at json-mode-number-re))
290+
(when (save-excursion (skip-chars-backward "-0-9.") (looking-at json-mode-number-re))
291291
(let ((num (+ (or delta 1)
292292
(string-to-number (buffer-substring-no-properties (match-beginning 0) (match-end 0)))))
293293
(pt (point)))

0 commit comments

Comments
 (0)