[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: |
Sun, 02 Dec 2001 01:11:36 -0500 |
> The reason why I needed wrapper mechanism was that I was advised by
> you not to use advice in table.el, and that was because
> `describe-function' of those advised functions mislead novice users to
> table.el where there is no real information about the original
> functions. I personally dislike this shortcoming of
> `describe-function'.
I still think that if a wrapper-hook is specific to a function,
then you might as well use
(defun kill-region (blabla)
(if kill-region-function
(funcall kill-region-function blabla)
..do the usual thing..))
Now if you want to allow to put more than one function on a wrapper-hook,
then you can use something like
(defun kill-region (blabla)
(if kill-region-functions
(let ((kill-region-functions kill-region-functions))
(funcall (pop kill-region-function) blabla))
..do the usual thing..))
You might want to define this idiom as a macro `with-wrapper-hook'
and you might even want to extend it to handle the local/global
behavior of normal hooks (i.e. if you encounter a `t' in a buffer-local
hook, it stands for its global value).
But I'd still advocate for passing not just the arguments but the
function itself so that the same wrapper-hook can be used for
several functions. This is obviously a bit more difficult to do
since the macro doesn't know from where it's being called.
Stefan
- Re: Lexical bindings (was Re: table.el), (continued)
- Re: Lexical bindings (was Re: table.el), Miles Bader, 2001/12/03
- Re: table.el, Tak Ota, 2001/12/02
- Re: table.el, Tak Ota, 2001/12/02
- Re: table.el, Miles Bader, 2001/12/02
- Re: table.el, Kai Großjohann, 2001/12/02
- Re: table.el, Tak Ota, 2001/12/02
- Re: table.el, Richard Stallman, 2001/12/03
Re: table.el, Thien-Thi Nguyen, 2001/12/01
Re: table.el, Richard Stallman, 2001/12/01
- Re: table.el, Tak Ota, 2001/12/02
- Re: table.el, Tak Ota, 2001/12/02
- Re: table.el, Stefan Monnier, 2001/12/02
- Re: table.el, Tak Ota, 2001/12/02
- Re: table.el, Stefan Monnier, 2001/12/03
- Re: table.el, Tak Ota, 2001/12/03
- Re: table.el, Stefan Monnier, 2001/12/03
- Re: table.el, Tak Ota, 2001/12/03
- Re: table.el, Stefan Monnier, 2001/12/03