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 10:35:26 +1200

 > > Does this DTRT?
 > >
 > > (defmacro define-obsolete-variable-alias (symbol aliased
 > >                                             &optional docstring when)
 > > "Make SYMBOL a variable alias for symbol ALIASED and warn that
 > > SYMBOL is obsolete. If provided, WHEN should be a string
 > > indicating when the variable was first made obsolete, for example
 > > a date or a release number. Fourth arg docstring, if non-nil, is
 > > documentation for symbol."
 > >   (list 'progn
 > >    `(defvaralias ,symbol ,aliased ,docstring)
 > >    `(make-obsolete-variable ,symbol ,aliased ,when)))
 > 
 > The first line of the docstring should be a complete sentence.

OK.

 > Occurrences of argument names in the docstring should be in capitals.
 > The fourth argument is WHEN, not DOCSTRING.

Yes. I changed the argument list but not the docstring.

 >  Personally, I like the
 > argument names OLDVAR and NEWVAR that XEmacs uses.  What about this:

I've tried to use the same names from defvaralias and make-obsolete-variable.

 > (defmacro define-obsolete-variable-alias (oldvar newvar
 >                                               &optional when docstring)
 >   "Make OLDVAR a variable alias for NEWVAR and warn that OLDVAR is obsolete.
 > If provided, WHEN should be a string indicating when OLDVAR was
 > first made obsolete, for example a date or a release number.  The
 > optional argument DOCSTRING specifies the documentation string
 > for OLDVAR; if it is omitted or nil, OLDVAR uses the documentation
 > string of NEWVAR"
 >   `(progn
 >      (defvaralias ,oldvar ,newvar ,docstring)
 >      (make-obsolete-variable ,oldvar ,newvar ,when)))

Yes, thanks. This is an improvement, but I might stick with my argument names
for consistency.


Nick




reply via email to

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