[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xterm.el
From: |
Dan Nicolaescu |
Subject: |
Re: xterm.el |
Date: |
Mon, 02 May 2005 10:00:46 -0700 |
Stefan Monnier <address@hidden> writes:
> >>>>> "Nick" == Nick Roberts <address@hidden> writes:
>
> > xterm.el makes Emacs take about seven times as long to load for me (about
14
> > seconds on my 200MHz PC). I have tested this by setting term-file-prefix
to
> > nil as described in startup.el
>
> > I think this is due to the recent changes in xterm.el e.g
> > substitute-key-definition is invoked 48 times.
>
> We could speed this up significantly by doing a single traversal of the
> keymap, doing the 48 substitutions simultaneously.
> The patch below defines a new function substitute-key-definitions which
> xterm.el could use to good advantage.
> The interest of this new function is that it is a *simultaneous*
> substitution, so it can be used to swap FOO and BAR, whereas doing it with
> substitute-key-definition requires substituting TOTO for FOO, than FOO for
> BAR and then BAR for TOTO.
When using substitute-key-definitions in xterm.el, the load time for
xterm.elc is reduced from 0.3 seconds to 0.13 seconds on a 500MHz
P3. (This is with substitute-key-definitions being called before all
the define-key calls).
I'll patch xterm.el accordingly if substitute-key-definitions is
committed.
--dan