From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: defvaralias Date: Fri, 6 May 2005 09:56:22 -0500 (CDT) Message-ID: <200505061456.j46EuMh11458@raven.dms.auburn.edu> References: <200505060142.j461gYF08458@raven.dms.auburn.edu> <17018.62209.92386.375984@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1115395271 21148 80.91.229.2 (6 May 2005 16:01:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 May 2005 16:01:11 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 06 18:01:09 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DU5Fe-0008LY-W6 for ged-emacs-devel@m.gmane.org; Fri, 06 May 2005 18:00:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DU5NP-0003cj-5q for ged-emacs-devel@m.gmane.org; Fri, 06 May 2005 12:08:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DU4VJ-0006kt-Cg for emacs-devel@gnu.org; Fri, 06 May 2005 11:12:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DU4V5-0006XT-7n for emacs-devel@gnu.org; Fri, 06 May 2005 11:12:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DU4Ux-0005jw-De for emacs-devel@gnu.org; Fri, 06 May 2005 11:12:15 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DU4LM-0004xK-Fz for emacs-devel@gnu.org; Fri, 06 May 2005 11:02:20 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j46Euiog026866; Fri, 6 May 2005 09:56:44 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j46EuMh11458; Fri, 6 May 2005 09:56:22 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: nickrob@snap.net.nz In-reply-to: <17018.62209.92386.375984@farnswood.snap.net.nz> (message from Nick Roberts on Fri, 6 May 2005 16:30:57 +1200) 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:36758 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36758 Nick Roberts wrote: > (defvar var1 "DOC1") > (defvar var2 "DOC2") > (defvaralias 'var1 'var2) I think if an alias is made only then only one of the variables needs to be declared. So the idea of the present behavior would be to do a (defvaralias 'var1 'var2) with a defvar for var1 instead of for var2? I do not believe that would be appropriate. As Stefan has pointed out defvaralias has a symmetry in its arguments (unlike define-obsolete-variable-alias neither) I do not understand. The variable alias structure is a directed graph, not an undirected graph. The arguments to defvaralias are asymmetric in their meaning. The first argument is the alias, the second the base variable. (defvaralias 'var1 'var2) is different (in non-trivial ways) from (defvaralias 'var2 'var1) in as far as `indirect-variable', cyclic variable indirection errors and such are concerned. Sincerely, Luc.