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#11904: 24.1.50; error byte compiling (defvar :foo ':foo), regression from 23.4 Date: Wed, 18 Jul 2012 11:21:15 -0400 Message-ID: References: <87liirw6jk.fsf@maru.md5i.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342624939 24624 80.91.229.3 (18 Jul 2012 15:22:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2012 15:22:19 +0000 (UTC) Cc: 11904@debbugs.gnu.org To: Michael Welsh Duggan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 18 17:22:16 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrW4t-0002ng-Ia for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 17:22:15 +0200 Original-Received: from localhost ([::1]:51922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrW4s-0007hI-SU for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 11:22:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrW4i-0007fz-Tq for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 11:22:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrW4a-0004f6-L9 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 11:22:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrW4a-0004f2-Gl for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 11:21:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SrWAU-0007b5-Fh for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 11:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jul 2012 15:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11904 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11904-submit@debbugs.gnu.org id=B11904.134262526529177 (code B ref 11904); Wed, 18 Jul 2012 15:28:02 +0000 Original-Received: (at 11904) by debbugs.gnu.org; 18 Jul 2012 15:27:45 +0000 Original-Received: from localhost ([127.0.0.1]:48677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrWAB-0007aW-LK for submit@debbugs.gnu.org; Wed, 18 Jul 2012 11:27:45 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:34476) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrWA8-0007aN-AC for 11904@debbugs.gnu.org; Wed, 18 Jul 2012 11:27:41 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6IFLH5G028460; Wed, 18 Jul 2012 11:21:18 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id E1E47AECB1; Wed, 18 Jul 2012 11:21:15 -0400 (EDT) In-Reply-To: (Michael Welsh Duggan's message of "Thu, 12 Jul 2012 09:52:15 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4283=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4283> : streams <786735> : uri <1168550> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62110 Archived-At: >>> (defvar :foo ':foo) >> I'm curious: where did you find such code? >> Such code used to be added "implicitly" back in Emacs-19 days because >> Emacs-19 did not have keywords. Some packages kept such code a bit >> longer in the hope that the resulting code would still work under >> Emacs-19, but nowadays this seems very outdated. > sml-mode package from Debian unstable. Duh! I guess it's time to re-label the 5.0beta1 into 5.0, where sml-compat.el has been removed (it only provided compatibility for ancient Emacsen)... OK, done! This said, I installed the patch below which simply removes the "defvar of a constant" check. Stefan === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-18 13:20:59 +0000 +++ src/ChangeLog 2012-07-18 15:19:50 +0000 @@ -1,5 +1,8 @@ 2012-07-18 Stefan Monnier + * eval.c (Fdefvar): Don't check constants since we only set the var if + it's not yet defined anyway (bug#11904). + * lisp.h (last_undo_boundary): Declare new var. * keyboard.c (command_loop_1): Set it. * cmds.c (Fself_insert_command): Use it to only remove boundaries that === modified file 'src/eval.c' --- src/eval.c 2012-07-10 16:53:26 +0000 +++ src/eval.c 2012-07-18 15:18:14 +0000 @@ -691,18 +691,6 @@ /* Do it before evaluating the initial value, for self-references. */ XSYMBOL (sym)->declared_special = 1; - if (SYMBOL_CONSTANT_P (sym)) - { - /* For upward compatibility, allow (defvar :foo (quote :foo)). */ - Lisp_Object tem1 = Fcar (tail); - if (! (CONSP (tem1) - && EQ (XCAR (tem1), Qquote) - && CONSP (XCDR (tem1)) - && EQ (XCAR (XCDR (tem1)), sym))) - error ("Constant symbol `%s' specified in defvar", - SDATA (SYMBOL_NAME (sym))); - } - if (NILP (tem)) Fset_default (sym, eval_sub (Fcar (tail))); else