all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* json.el speed-ups
@ 2008-10-07 13:29 T. V. Raman
  2008-10-07 16:35 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: T. V. Raman @ 2008-10-07 13:29 UTC (permalink / raw)
  To: emacs-devel

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

Change Summary:

Use forward-char in json-advance 
Use skip-syntax-forward to implement skipping whitespace

diff json.el  ~/sourceforge/emacs/lisp/json.el
126,127c126,130
<   (forward-char n))
< 
---
>   (unless n (setq n 1))
>   (let ((goal (+ (point) n)))
>     (goto-char goal)
>     (when (< (point) goal)
>       (signal 'end-of-file nil))))
142c145
< (defsubst json-skip-whitespace ()
---
> (defun json-skip-whitespace ()
144c147,148
<   (skip-syntax-forward " "))
---
>   (while (looking-at "[\t\r\n\f\b ]")
>     (goto-char (match-end 0))))
06:28:10 labrador g-client $ 

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-08  3:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 13:29 json.el speed-ups T. V. Raman
2008-10-07 16:35 ` Stefan Monnier
2008-10-08  3:21   ` T. V. Raman

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.