[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: table.el
From: |
Richard Stallman |
Subject: |
Re: table.el |
Date: |
Mon, 3 Dec 2001 17:58:57 -0700 (MST) |
;; Hooks can also contain a non-list.
(unless (consp ,wrapper-var)
(setq ,wrapper-var (list ,wrapper-var)))
This feature exists for hooks only for historical compatibility. We
discourage its use. There is no reason to support it for a new
feature such as wrappers.
I'd still like to find a way to reuse `run-hooks' rather than
manually handle the non-list-to-list conversion and the local/global
thingy,
The local/global handling is just a few lines of code. Making a
subroutine for that would cost more than it is worth. It would make
the code slower, and bigger, and more work to understand because not
self-contained.
(nth 1 (backtrace-frame
(if (eq (nth 1 (eval-when-compile
(backtrace-frame 1))) 'progn) 7 1)))
Using backtrace-frame is not robust. There seem to be three
possibilities here:
1. Define some new mechanism just for this purpose, and make it reliable.
2. Pass a constructed lambda expression as Stefan(?) suggested.
3. Establish a convention that the user should write the outside
function name, quoted, as the second element of WRAPPER-FORM.
It is be useful to be able to test the function name, so I think 3 is
best.
As I said WRAPPER-VAR is a misnomer since hooks just aren't variables.
They are represented as symbols (just like coding-systems, faces and
several other kinds of objects) and they happen to use the `symbol-value'
and the `default-value' of a symbol for their internals which makes
them look similar to variables, but they are not variables.
That is a strange thing to say. Of course hooks are variables.
They are variables used for a specific purpose.
- Re: table.el, (continued)
- 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
- Re: table.el, Richard Stallman, 2001/12/03
- Re: table.el, Tak Ota, 2001/12/04
- Re: table.el, Richard Stallman, 2001/12/04
- Re: table.el, Miles Bader, 2001/12/03
- Re: table.el,
Richard Stallman <=
- Re: table.el, Stefan Monnier, 2001/12/03
- Re: table.el, Tak Ota, 2001/12/03
- Re: table.el, Stefan Monnier, 2001/12/04
- Re: table.el, Tak Ota, 2001/12/04
- Re: table.el, Stefan Monnier, 2001/12/04
- Re: table.el, Tak Ota, 2001/12/04
- Re: table.el, Stefan Monnier, 2001/12/05
- Re: table.el, Richard Stallman, 2001/12/04
- Re: table.el, Tak Ota, 2001/12/04
- Re: table.el, Richard Stallman, 2001/12/04