[Top][All Lists]

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

Re: declare-function in files from Gnus (hashcash.el, imap.el)

From: Reiner Steib
Subject: Re: declare-function in files from Gnus (hashcash.el, imap.el)
Date: Tue, 04 Dec 2007 00:12:07 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

On Sun, Dec 02 2007, Dan Nicolaescu wrote:

> Such files can just add a 1 line compatibility code:
> (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))

I think this is not a good idea...

,----[ (info "(elisp)Coding Conventions") ]
|    * If a package needs to define an alias or a new function for
|      compatibility with some other version of Emacs, name it with the
|      package prefix, not with the raw name with which it occurs in the
|      other version.  Here is an example from Gnus, which provides many
|      examples of such compatibility issues.
|           (defalias 'gnus-point-at-bol
|             (if (fboundp 'point-at-bol)
|                 'point-at-bol
|               'line-beginning-position))

[In Gnus, we had some bug report from XEmacs users that was very hard
to find because some XEmacs package defined an un-prefixed Emacs
function so that the test (fboundp ...) returned t although the
functionality was not as expected.]

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

reply via email to

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