[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recording-elisp.el - try recording commands as elisp code
From: |
yzhh |
Subject: |
Re: recording-elisp.el - try recording commands as elisp code |
Date: |
Sat, 03 Nov 2007 12:23:54 +0800 |
User-agent: |
KNode/0.10.5 |
Stefan Monnier wrote:
> I suspect that this kind of problem is going to re-appear in various
> other forms for other commands. I think the right way to do it is to
> provide "hooks" in record-lisp which isearch can then use to explain
> what it does. E.g. record-lisp could check the last command's
> `record-lisp-cleanup-function' symbol and if set call it to clean up the
> last few commands. Isearch could then set this property on
> `isearch-exit'. Well, to tell you the truth, I have no idea what I'm
> talking about, so the suggestion probably isn't workable as is, but
> hopefully it gives you an idea of how to cleanly interface the
> two packages.
I saw your post later than I took actions. Your suggestion is similar to
what I did:
I've reconstructed the code so that the output procedure uses an alist to
lookup a "special treatment" function for certain commands. The function
takes the original recorded commands and already-have output command list,
and returns a modified output.
I implemented 3 such functions: one for simply ignoring a command, one for
cumulating consecutive self-insert-command, and another for isearch-exit.
More to come.
In this way I think we can put some special treatment of commonly used
commands here. And other not-very-common commands can be taken care of by
the corresponding package developer or the user. I'm I right?
--
regards,
yzhh
- Re: recording-elisp.el - try recording commands as elisp code, (continued)
- Re: recording-elisp.el - try recording commands as elisp code, Richard Stallman, 2007/11/05
- Re: recording-elisp.el - try recording commands as elisp code, Juri Linkov, 2007/11/05
- Re: recording-elisp.el - try recording commands as elisp code, yzhh, 2007/11/06
- Re: recording-elisp.el - try recording commands as elisp code, Richard Stallman, 2007/11/06
- Re: recording-elisp.el - try recording commands as elisp code, Richard Stallman, 2007/11/06
- Re: recording-elisp.el - try recording commands as elisp code, Juri Linkov, 2007/11/06
- Re: recording-elisp.el - try recording commands as elisp code, Richard Stallman, 2007/11/07
Re: recording-elisp.el - try recording commands as elisp code, Stefan Monnier, 2007/11/02
- Re: recording-elisp.el - try recording commands as elisp code,
yzhh <=
Re: recording-elisp.el - try recording commands as elisp code, Richard Stallman, 2007/11/02