emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

call1(Vrun_hooks, Qmy_hook) vs. Frun_hook(1, &Qmy_hook)


From: Juanma Barranquero
Subject: call1(Vrun_hooks, Qmy_hook) vs. Frun_hook(1, &Qmy_hook)
Date: Mon, 19 Nov 2001 17:36:52 +0100

According to lisp.h:

> /* To run a normal hook, use the appropriate function from the list below.
>    The calling convention:
> 
>    if (!NILP (Vrun_hooks))
>      call1 (Vrun_hooks, Qmy_funny_hook);
> 
>    should no longer be used.  */
> extern Lisp_Object Vrun_hooks;
> EXFUN (Frun_hooks, MANY);
> EXFUN (Frun_hook_with_args, MANY);
> EXFUN (Frun_hook_with_args_until_success, MANY);
> EXFUN (Frun_hook_with_args_until_failure, MANY);

etc. That's a comment from 1995, I think.

However, in the C sources there are just four calls to
Frun_hook_with_args and another one to Frun_hook. OTOH, at least six
source files, and perhaps as many as thirteen, contain calls in the
supposedly deprecated style. For example, from `kill-buffer'
(buffer.c):

>     if (!NILP (Vrun_hooks))
>       call1 (Vrun_hooks, Qkill_buffer_hook);

Is still the style on lisp.h the recommended one?

                                                           /L/e/k/t/u




reply via email to

[Prev in Thread] Current Thread [Next in Thread]