emacs-devel
[Top][All Lists]
Advanced

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

Re: Incompatible change without "warning"


From: Lute Kamstra
Subject: Re: Incompatible change without "warning"
Date: Fri, 22 Apr 2005 01:56:44 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Nick Roberts <address@hidden> writes:

> Richard Stallman writes:
>  > Before you install this, please write the changes for etc/NEWS and the
>  > Lisp manual to install at the same time.
>
> For completeness, I guess there should be one for functions too.

Good idea.

> Indeed, there seem to be more uses of make-obsolete than
> make-obsolete-variable (possibly bacause defvaralias is newer than
> defalias). I see XEmacs has define-obsolete-function-alias so we
> could do:
>
> (defmacro define-obsolete-function-alias (function aliased
>                                                  &optional docstring when)
>   "blurb"
>   `(progn
>      (defalias ,function ,aliased ,docstring)
>      (make-obsolete ,function ,aliased ,when)))

I think it's better to have WHEN before DOCSTRING.  DOCSTRING is
hardly ever used while WHEN is used frequently.

> Or we could combine the two e.g
>
> (defmacro define-obsolete-alias (new aliased
>                                    &optional docstring when)
>   "blurb"
>   `(if (fboundp ,aliased)
>        (progn
>        (defalias ,new ,aliased ,docstring)
>        (make-obsolete ,new ,aliased ,when))
>      (progn
>        (defvaralias ,new ,aliased ,docstring)
>        (make-obsolete-variable ,new ,aliased ,when))))

Seems like a bad idea to me.  For one thing, you can use
define-obsolete-{function,variable}-alias before you define ALIASED.
(I think XEmacs requires this.)  That won't work in this case.

> It would have to be done a bit differently though, to deal with case
> of a symbol having both a value and a function definition.

How can you determine what's the right thing, in that case?

Lute.






reply via email to

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