From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#5950: defvaralias after defvar should be warned in runtime Date: Thu, 16 Sep 2010 11:27:57 +0200 Message-ID: References: <4BC6A096.8030801@yahoo.co.jp> <87r5gu34ag.wl%irieshinsuke@yahoo.co.jp> <3keicu1h3v.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284630059 11657 80.91.229.12 (16 Sep 2010 09:40:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Sep 2010 09:40:59 +0000 (UTC) Cc: 5950@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 16 11:40:53 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OwAxU-0004aX-CO for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Sep 2010 11:40:48 +0200 Original-Received: from localhost ([127.0.0.1]:43916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwAxT-0003Cl-LN for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Sep 2010 05:40:47 -0400 Original-Received: from [140.186.70.92] (port=60913 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwAxM-0003Be-Dm for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2010 05:40:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwAxJ-00066E-AJ for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2010 05:40:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60531) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwAxJ-000668-88 for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2010 05:40:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OwAjC-0002xz-Ef; Thu, 16 Sep 2010 05:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Sep 2010 09:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5950 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5950-submit@debbugs.gnu.org id=B5950.128462914511395 (code B ref 5950); Thu, 16 Sep 2010 09:26:02 +0000 Original-Received: (at 5950) by debbugs.gnu.org; 16 Sep 2010 09:25:45 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwAiu-0002xk-VO for submit@debbugs.gnu.org; Thu, 16 Sep 2010 05:25:45 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwAis-0002xc-U0 for 5950@debbugs.gnu.org; Thu, 16 Sep 2010 05:25:43 -0400 Original-Received: from ceviche.home (vpn-132-204-232-36.acd.umontreal.ca [132.204.232.36]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o8G9RwcC006544; Thu, 16 Sep 2010 05:27:59 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 91E5166289; Thu, 16 Sep 2010 11:27:57 +0200 (CEST) In-Reply-To: <3keicu1h3v.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 15 Sep 2010 23:51:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3623=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 16 Sep 2010 05:26:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40204 Archived-At: >> I think the byte-hunk-handler should be put to `defvaralias' rather than >> `define-obsolete-variable-alias'. `defvaralias' is a primitive function >> which causes the problem in `define-obsolete-variable-alias' macro. > The issue _is_ with defvaralias, but it's only a problem for user > options, things that might be set in .emacs before the associated > alias definition is evaluated. It's hard to see why there should be > non-obsolete aliases to user options, it just causes confusion. I > think there would be false positives if the warning was associated > with defvaralias, which is mostly used with non-user-options, I would > think. > The last time a similar issue came up, Stefan preferred that only > define-obsolete-variable-alias be changed; see Well, in this case I'd rather check defvaralias, since the problem is there: if (defvaralias 'foo 'bar) is executed after both `foo' and `bar' have been given values, then it will necessarily have to drop one of the two, which is the source of the problem. Changing defvaralias to try and be more clever would definitely be wrong. But changing it to output a warning about the problematic situation would be OK and changing the byte-compiler to output a warning in cases that make such a situation more likely is also perfectly good. Stefan