[Top][All Lists]

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

Re: json.el speed-ups

From: Stefan Monnier
Subject: Re: json.el speed-ups
Date: Tue, 07 Oct 2008 12:35:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> I've been using the following mods to json.el with good results,
> am attaching diff output.

Please use unified diffs (or context diffs).

> <   (forward-char n))
> ---
>> (unless n (setq n 1))
>> (let ((goal (+ (point) n)))
>> (goto-char goal)
>> (when (< (point) goal)
>> (signal 'end-of-file nil))))

That looks OK, as long as the code doesn't catch `end-of-file' or
`end-of-buffer' explicitly elsewhere.

> 144c147,148
> <   (skip-syntax-forward " "))
> ---
>> (while (looking-at "[\t\r\n\f\b ]")
>> (goto-char (match-end 0))))

Using (skip-chars-forward "\t\r\n\f\b ") would make the diff more
obviously correct.  Have you checked that all those chars have the
"whitespace" syntax in the syntax-table?


reply via email to

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