From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ikumi Keita Newsgroups: gmane.emacs.bugs Subject: bug#31718: 26.1; Strange behavior of `cond' Date: Wed, 06 Jun 2018 18:14:03 +0900 Message-ID: <48698.1528276443@localhost> References: <37954.1528179962@localhost> <46058.1528263715@localhost> <87wovc8ipt.fsf@cochranmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: blaine.gmane.org 1528276397 19497 195.159.176.226 (6 Jun 2018 09:13:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 6 Jun 2018 09:13:17 +0000 (UTC) Cc: Andreas Schwab , 31718@debbugs.gnu.org, Vibhav Pant To: Robert Cochran Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 06 11:13:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQUVE-0004wT-84 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jun 2018 11:13:12 +0200 Original-Received: from localhost ([::1]:50966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQUXL-00053d-21 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jun 2018 05:15:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQUX4-0004zc-Ls for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2018 05:15:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQUX0-0003OW-MW for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2018 05:15:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56199) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQUX0-0003OR-Hp for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2018 05:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fQUX0-0004lx-6L for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2018 05:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ikumi Keita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jun 2018 09:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31718-submit@debbugs.gnu.org id=B31718.152827644818258 (code B ref 31718); Wed, 06 Jun 2018 09:15:02 +0000 Original-Received: (at 31718) by debbugs.gnu.org; 6 Jun 2018 09:14:08 +0000 Original-Received: from localhost ([127.0.0.1]:35863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQUW8-0004kQ-BC for submit@debbugs.gnu.org; Wed, 06 Jun 2018 05:14:08 -0400 Original-Received: from smtp1.inetd.co.jp ([210.129.88.11]:43548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQUW6-0004kG-IG for 31718@debbugs.gnu.org; Wed, 06 Jun 2018 05:14:07 -0400 Original-Received: from localhost (210-20-196-135.rev.home.ne.jp [210.20.196.135]) by smtp1.inetd.co.jp (Postfix) with ESMTPA id 632BAB2; Wed, 6 Jun 2018 18:14:03 +0900 (JST) In-reply-to: <87wovc8ipt.fsf@cochranmail.com> Comments: In-reply-to Robert Cochran message dated "Wed, 06 Jun 2018 00:41:50 -0700." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.1 Content-ID: <48697.1528276443.1@localhost> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:147082 Archived-At: Hi Robert, >>>>> Robert Cochran writes: > Ikumi Keita writes: >> Hi Andreas, thanks for your reply. >> >>>>>>> Andreas Schwab writes: >>> On Jun 05 2018, Ikumi Keita wrote: >>>> (defun xyz (arg) >>>> "dummy" >>>> ; (cond ((eq arg nil) ; OK >>>> ; (cond ((eq arg 'abc) ; OK >>>> ; (cond ((eq arg 'def) ; OK >>>> (cond ((eq arg 'default) ; NG >> >>> The byte-compiler uses 'default as a magic symbol, which breaks this >>> case. >> >> Does this mean that this behavior is a (new) designed feature of elisp >> and not a bug? >> If so, is it the respoisibility of the authors of the codes to rewrite >> not to use `default' or else to make sure to set >> `byte-compile-cond-use-jump-table' to nil at byte compile? > I for one consider this a bug, for 2 reasons: > 1) It's not reasonable to expect a Lisp programmer to just know that > using the symbol default is problematic. > 2) It creates diverging behavior between compiled and non-compiled Lisp. I agree. > To that end, I've made a small patch to rectify the behavior. Instead of > hardcoding a symbol, it uses gensym to create a unique one. I did a full > build of Emacs, as well as ran 'make check' and had identical results > pre- and post-change, so I'm reasonably sure it's correct. Thanks for the patch, it fixes the problem on my side! Regards, Ikumi Keita