emacs-devel
[Top][All Lists]
Advanced

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

Re: Incompatible change without "warning"


From: Nick Roberts
Subject: Re: Incompatible change without "warning"
Date: Fri, 22 Apr 2005 11:14:38 +1200

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. 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)))

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))))

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.

Nick




reply via email to

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