> Gnus should define a function called gnus-run-mode-hooks, which calls
> run-mode-hooks if that is defined, otherwise run-hooks. Then all the
> modes in Gnus could use gnus-run-mode-hooks.
I've done it in the Gnus trunk and the v5-10 branch.
Thank you.
>> In <[EMAIL PROTECTED]>
>> Lute Kamstra <[EMAIL PROTECTED]> wrote:
>> Other major mode in Gnus still use gnus-run-hooks which uses
>> run-hooks. Katsumi, could you fix those modes in a similar way?
> In <[EMAIL PROTECTED]> Katsumi Yamaoka wrote:
> Ok, I'll make time to do that, m
> (or (fboundp 'run-mode-hooks)
> (defalias 'run-mode-hooks 'run-hooks))
It seems that that I was badly educated by code I read: I've quite
often seen the use of constructs like the one above.
Are there any examples in the Emacs sources?
If so, could you show me a few?
___
> Richard Stallman <[EMAIL PROTECTED]> writes:
>> Gnus should define a function called gnus-run-mode-hooks, which calls
>> run-mode-hooks if that is defined, otherwise run-hooks. Then all the
>> modes in Gnus could use gnus-run-mode-hooks.
> In <[EMAIL PROTECTED]>
> Lute Kamstra <[EMAI
> Better use:
>
>(defalias 'mymodule-function-in-doubt
> (if (fboundp 'function-in-doubt)
> 'function-in-doubt
>(lambda (..) ...)))
I was only highlighting the fact that defining functions from "future"
Emacsen is Not Good, but yes, your way is better. Every non-contrive
Lute Kamstra <[EMAIL PROTECTED]> writes:
> It seems that that I was badly educated by code I read: I've quite
> often seen the use of constructs like the one above.
There is, or at least used to be, a fair amount of bad old code that
does stuff like that. One of the worst offenders was (not sure
> (if (fboundp 'function-in-doubt)
> (defalias 'mymodule-function-in-doubt 'function-in-doubt)
> (defun mymodule-function-in-doubt ...))
Actually this form has the disadvantage that the
byte-compiler would have to check which functions
are defnied in every branch
> (if (fboundp 'function-in-doubt)
> (defalias 'mymodule-function-in-doubt 'function-in-doubt)
> (defun mymodule-function-in-doubt ...))
Actually this form has the disadvantage that the byte-compiler would have to
check which functions are defnied in every branch. And snice it doesn't
Richard Stallman <[EMAIL PROTECTED]> writes:
> Maybe Gnus can do something like:
>
> (or (fboundp 'run-mode-hooks)
> (defalias 'run-mode-hooks 'run-hooks))
>
> Definitely not! Gnus should not mess with the way Emacs defines
> (or doesn't define) these functions!
It seems that that
Is it possible to use run-hooks in those Emacs versions?
Yes, but it won't always be correct.
Maybe Gnus can do something like:
(or (fboundp 'run-mode-hooks)
(defalias 'run-mode-hooks 'run-hooks))
Definitely not! Gnus should not mess with the way Emacs defines
(or doesn't d
> Maybe Gnus can do something like:
>
> (or (fboundp 'run-mode-hooks)
> (defalias 'run-mode-hooks 'run-hooks))
(Not in this case, that's already been fixed but) that would not be good.
The usual answer is making your own lookalike:
(if (fboundp 'function-in-doubt)
(defalias 'mymodul
> In <[EMAIL PROTECTED]> Lute Kamstra wrote:
>> Is it possible to use run-hooks in those Emacs versions?
> Maybe Gnus can do something like:
> (or (fboundp 'run-mode-hooks)
> (defalias 'run-mode-hooks 'run-hooks))
> I saw that most hooks are run with gnus-run-hooks, which calls
> run-ho
Katsumi Yamaoka <[EMAIL PROTECTED]> writes:
> run-mode-hooks is only available in Emacs 22, while Gnus v5.11
> still supports Emacs 20 and 21 (and No Gnus supports Emacs 21).
>
> 2005-05-26 Lute Kamstra <[EMAIL PROTECTED]>
>
> * score-mode.el (gnus-score-mode): Use run-mode-hooks.
Sorry a
Hi,
run-mode-hooks is only available in Emacs 22, while Gnus v5.11
still supports Emacs 20 and 21 (and No Gnus supports Emacs 21).
2005-05-26 Lute Kamstra <[EMAIL PROTECTED]>
* score-mode.el (gnus-score-mode): Use run-mode-hooks.
Is it possible to use run-hooks in those Emacs versions
This change is correct--please install it.
___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
15 matches
Mail list logo