emacs-devel
[Top][All Lists]
Advanced

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

Re: run-hooks vs. run-mode-hooks.


From: Juanma Barranquero
Subject: Re: run-hooks vs. run-mode-hooks.
Date: Fri, 27 May 2005 10:01:30 +0200

> 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 'mymodule-function-in-doubt 'function-in-doubt)
    (defun mymodule-function-in-doubt ...))

Otherwise, you're gonna mislead any module loaded afterwards that
tries to determine whether 'function-in-doubt exists or not.

-- 
                    /L/e/k/t/u




reply via email to

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