Nick Roberts <[EMAIL PROTECTED]> 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.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel