[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: table.el
From: |
Stefan Monnier |
Subject: |
Re: table.el |
Date: |
Sat, 01 Dec 2001 13:08:29 -0500 |
> 01 Dec 2001 18:21:32 +0900: Miles Bader <address@hidden> wrote:
>
> > Tak Ota <address@hidden> writes:
> > > (defun kill-region-offset-by-5-wrapper ()
> > > (kill-region (+ beg 5) (+ end 5)))
> >
> > It's bad to require that a `wrapper' know the argument names of the
> > function that invokes it; better to simply pass the arguments to
> > `run-wrappers' somehow, and have them passed each wrapper as ordinary
> > arguments.
>
> No, I am intentionally making the normally discouraged conduct. As
> the name `kill-region-offset-by-5-wrapper' implies this wrapper
> function is the extension of the kill-region. It is perfectly
> legitimate the extender knowing exactly what it is extending and
> knowing how the original is implemented.
If the wrapper is intimately linked like that, then why not
just use a simple`kill-region-function':
(defun kill-region (babla)
(if kill-region-function
(funcall kill-region-function blabla)
blibli))
> Since I am trying to create an extension mechanism I am fully taking
> advantage of http://www.gnu.org/software/emacs/emacs-paper.html#SEC18
I'm interested in a wrapper kind of extension mechanism (I need
something like that in PCL-CVS so that I can use the same keymap
in two buffers but with different behavior (in the *cvs* buffer
it operates on the marked files, while in the *cvs-info* buffer
it operates on the current file and current version of that file).
But I want a single wrapper for several functions, so
the wrapper can't be so intimately linked to the wrapped function.
Stefan
- Re: table.el, Tak Ota, 2001/12/01
- Re: table.el, Miles Bader, 2001/12/01
- Re: table.el, Tak Ota, 2001/12/01
- Re: table.el, Miles Bader, 2001/12/01
- Re: table.el,
Stefan Monnier <=
- Re: table.el, Richard Stallman, 2001/12/02
- Re: table.el, Stefan Monnier, 2001/12/02
- Re: table.el, Richard Stallman, 2001/12/03
- Re: table.el, Stefan Monnier, 2001/12/03
- Re: table.el, Richard Stallman, 2001/12/04
- Merging x*, w32* and mac* sources (was Re: table.el), Kim F. Storm, 2001/12/05
- Re: Merging x*, w32* and mac* sources (was Re: table.el), Eli Zaretskii, 2001/12/05
- Re: Merging x*, w32* and mac* sources (was Re: table.el), Kim F. Storm, 2001/12/05
- Re: Merging x*, w32* and mac* sources (was Re: table.el), Jason Rumney, 2001/12/05
- Re: Merging x*, w32* and mac* sources (was Re: table.el), William M. Perry, 2001/12/05