[Top][All Lists]
[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: |
Thu, 21 Apr 2005 16:17:40 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Nick Roberts <address@hidden> writes:
> > I'd prefer to define the same `define-obsolete-variable-alias' macro as
> > used in XEmacs.
> >
> > That sounds useful.
>
> 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.
Occurrences of argument names in the docstring should be in capitals.
The fourth argument is WHEN, not DOCSTRING. Personally, I like the
argument names OLDVAR and NEWVAR that XEmacs uses. What about this:
(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)))
> The version in XEmacs may be better but I've not looked at at it
> deliberately, as I wasn't sure of the implications of copying it.
Lute, who didn't look at XEmacs' implementation either.
- Incompatible change without "warning", Frank Schmitt, 2005/04/19
- Incompatible change without "warning", Nick Roberts, 2005/04/19
- Re: Incompatible change without "warning", Stefan Monnier, 2005/04/19
- Re: Incompatible change without "warning", Kevin Rodgers, 2005/04/19
- Re: Incompatible change without "warning", Richard Stallman, 2005/04/20
- Re: Incompatible change without "warning", Nick Roberts, 2005/04/20
- Re: Incompatible change without "warning",
Lute Kamstra <=
- Re: Incompatible change without "warning", Nick Roberts, 2005/04/21
- Re: Incompatible change without "warning", Lute Kamstra, 2005/04/22
- Re: Incompatible change without "warning", Nick Roberts, 2005/04/22
- Re: Incompatible change without "warning", Lute Kamstra, 2005/04/23
- Re: Incompatible change without "warning", David Kastrup, 2005/04/23
- Re: Incompatible change without "warning", Lute Kamstra, 2005/04/23
- Re: Incompatible change without "warning", Nick Roberts, 2005/04/23
- Re: Incompatible change without "warning", Eli Zaretskii, 2005/04/23
- Re: Incompatible change without "warning", Lute Kamstra, 2005/04/23
- Re: Incompatible change without "warning", Richard Stallman, 2005/04/21