From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Re: Incompatible change without "warning" Date: Thu, 21 Apr 2005 16:17:40 +0200 Message-ID: <87u0m0rz7f.fsf@xs4all.nl> References: <16997.28602.876638.54728@farnswood.snap.net.nz> <16998.58339.710430.454702@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114093009 3141 80.91.229.2 (21 Apr 2005 14:16:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2005 14:16:49 +0000 (UTC) Cc: ich@frank-schmitt.net, rms@gnu.org, Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 21 16:16:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOcTC-00085e-5R for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2005 16:15:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOcXv-0007zz-9K for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2005 10:20:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DOcWs-0007nC-EC for emacs-devel@gnu.org; Thu, 21 Apr 2005 10:19:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DOcWo-0007mo-Vs for emacs-devel@gnu.org; Thu, 21 Apr 2005 10:19:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOcWo-0007i7-Hy for emacs-devel@gnu.org; Thu, 21 Apr 2005 10:19:38 -0400 Original-Received: from [194.109.24.27] (helo=smtp-vbr7.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DOcXe-0008BD-55; Thu, 21 Apr 2005 10:20:30 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr7.xs4all.nl (8.12.11/8.12.11) with ESMTP id j3LEHfWh056148; Thu, 21 Apr 2005 16:17:42 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DOcUu-0004e8-00; Thu, 21 Apr 2005 16:17:40 +0200 Original-To: Nick Roberts In-Reply-To: <16998.58339.710430.454702@farnswood.snap.net.nz> (Nick Roberts's message of "Thu, 21 Apr 2005 11:21:07 +1200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 41 X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36229 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36229 Nick Roberts 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.