[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: two json.el bugs

From: Drew Adams
Subject: RE: two json.el bugs
Date: Fri, 5 May 2017 12:25:25 -0700 (PDT)

> > 1. `json-skip-whitespace' uses a hardcoded list of whitespace
> > characters, which means it fails to skip over other WSpace=Y
> > characters. It should probably use `search-whitespace-regexp' from
> > isearch.el (or an equivalent value from elsewhere) instead.
> JSON is defined by the standard [ECMA-404][1]...
> Section 4, paragraph the last:
> | Insignificant whitespace is allowed before or after any token.
> | The whitespace characters are: character tabulation (U+0009),
> | line feed (U+000A), carriage return (U+000D), and space (U+0020).
> In my copy of Emacs 25.1, json-skip-whitespace looks like this:
> (defun json-skip-whitespace ()
>   "Skip past the whitespace at point."
>   (skip-chars-forward "\t\r\n\f\b "))
> that is, it skips the whitespace characters defined by the spec, and
> in addition to that, also form feed (U+000C) and backspace (U+0007).
> If anything, \f\b should be *removed* from characters to be skipped.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]