From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: raman@users.sourceforge.net
Cc: emacs-devel@gnu.org
Subject: Re: json.el speed-ups
Date: Tue, 07 Oct 2008 12:35:56 -0400 [thread overview]
Message-ID: <jwvwsgk74cd.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <18667.25652.771618.151560@gargle.gargle.HOWL> (T. V. Raman's message of "Tue, 7 Oct 2008 06:29:24 -0700")
> 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?
Stefan
next prev parent reply other threads:[~2008-10-07 16:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 13:29 json.el speed-ups T. V. Raman
2008-10-07 16:35 ` Stefan Monnier [this message]
2008-10-08 3:21 ` T. V. Raman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvwsgk74cd.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=raman@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.