From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: define-obsolete-variable-alias problem Date: Thu, 10 Apr 2008 21:36:12 -0400 Message-ID: References: <18429.40354.962001.482941@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207877794 21383 80.91.229.12 (11 Apr 2008 01:36:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Apr 2008 01:36:34 +0000 (UTC) Cc: Glenn Morris , emacs-devel@gnu.org To: Nick Roberts Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 11 03:37:04 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jk8CM-0007jo-Ru for ged-emacs-devel@m.gmane.org; Fri, 11 Apr 2008 03:37:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jk8Bi-0003aq-Ui for ged-emacs-devel@m.gmane.org; Thu, 10 Apr 2008 21:36:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jk8Bf-0003aR-Ai for emacs-devel@gnu.org; Thu, 10 Apr 2008 21:36:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jk8Bc-0003aF-UL for emacs-devel@gnu.org; Thu, 10 Apr 2008 21:36:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jk8Bc-0003aC-PL for emacs-devel@gnu.org; Thu, 10 Apr 2008 21:36:16 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jk8BZ-0008FO-Di; Thu, 10 Apr 2008 21:36:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhgFAIRd/kfO+KV8/2dsb2JhbACBXal7 X-IronPort-AV: E=Sophos;i="4.25,638,1199682000"; d="scan'208";a="18334698" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 10 Apr 2008 21:36:12 -0400 Original-Received: from pastel.home ([206.248.165.124]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id RFV65912; Thu, 10 Apr 2008 21:36:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 3D3007F35; Thu, 10 Apr 2008 21:36:12 -0400 (EDT) In-Reply-To: <18429.40354.962001.482941@kahikatea.snap.net.nz> (Nick Roberts's message of "Thu, 10 Apr 2008 16:54:58 +1200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:94922 Archived-At: >> Given this sequence: >> >> (progn >> (setq foo 1) >> (define-obsolete-variable-alias 'foo 'bar) >> (defvar bar 2)) >> >> I'd have expected the end result to be bar = foo = 1. >> However, the actual result is bar = foo = 2. > Isn't this really a problem with defvaralias? Yes. > Perhaps we could test there if new-alias is bound and if so assign the > value to base-variable. Indeed except if base-variable already exist, we can't do that. Stefan