From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.bugs Subject: bug#29165: 26.0.90; can't use some code byte-compiled under emacs 24 Date: Mon, 13 Nov 2017 14:42:18 -0500 Message-ID: <3EB0E53F-4B99-44C2-9F2E-1125A33E408B@permabit.com> References: <6eh8u7x5be.fsf@just-testing.permabit.com> <87375r7f0g.fsf@users.sourceforge.net> <9f1e7a1f-bfc0-43a4-9acb-cf69b85587be@default> <5C8038D7-FF85-4C42-A728-F3F85CDAC85C@permabit.com> <87efpb46sp.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510602196 362 195.159.176.226 (13 Nov 2017 19:43:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 19:43:16 +0000 (UTC) Cc: Andreas Schwab , Philipp Stephani , 29165@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 13 20:43:12 2017 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 1eEKdR-00089D-UH for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2017 20:43:10 +0100 Original-Received: from localhost ([::1]:56109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEKdZ-0002fX-BX for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2017 14:43:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEKdQ-0002eK-7X for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 14:43:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEKdL-0001gv-BU for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 14:43:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEKdL-0001gm-5U for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 14:43:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eEKdK-00063v-VA for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 14:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ken Raeburn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Nov 2017 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29165 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 29165-submit@debbugs.gnu.org id=B29165.151060214723253 (code B ref 29165); Mon, 13 Nov 2017 19:43:02 +0000 Original-Received: (at 29165) by debbugs.gnu.org; 13 Nov 2017 19:42:27 +0000 Original-Received: from localhost ([127.0.0.1]:38903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEKcl-00062z-69 for submit@debbugs.gnu.org; Mon, 13 Nov 2017 14:42:27 -0500 Original-Received: from mail-qt0-f172.google.com ([209.85.216.172]:44372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEKcj-00062n-T2 for 29165@debbugs.gnu.org; Mon, 13 Nov 2017 14:42:26 -0500 Original-Received: by mail-qt0-f172.google.com with SMTP id 8so21060094qtv.1 for <29165@debbugs.gnu.org>; Mon, 13 Nov 2017 11:42:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=permabit.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vxT4EpzQeIzbanZuc+aQHk/XdJxF4L9PCC0WGAWRWMw=; b=cykeeZ8pkkgGiME4zwG6E2rKsazPYFP9gn0AD9EgZKGXregqtBMzd0wDLlW7URQnDA pTOACsthIaehbMjZwrd0itSeyQ250CeZLqzgcpy+QoYdKQnrgThVm9IMMh86Skgd7e+u PHAqcmuO0vfUdrr2R55ZpYYIjPiAD95okMz30= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vxT4EpzQeIzbanZuc+aQHk/XdJxF4L9PCC0WGAWRWMw=; b=VqKzD4QU3r+7xf/MgZJYkGU82dlCtHqcXLwMCp1ejlXOvB2LSIv/1++zfG5G407yrS DWREoXssLa+VnJQWGrydb5H94mXhoba4ARt9me8HGsuikSp8bE+tKqkt6ClTmJmoHLGc aQ7W2fYPbagw+sxz3ojTb7PCuCgKmv2/SD1EcfktJLRZ3lIIztnySB+fhtNeBeTRvXPW UvTrzSikHLTjEwHl4H+3HYqL2DO6BTZbHDU1piEhwRc52YuZnUvC2vRIsNUhqyuZc8Dl LV3TM4y1L/vjvwL44gh+XRGZoJLJqPP2hl/bBRVZbH+uMAbprzZKcpJcDcxTPPAO2QyM pJNA== X-Gm-Message-State: AJaThX5OF6PCMxLesoK0d2hKIuHCiAkZJoOOJgdxgVVjonGoc0DC2vXQ joWNHwZk8F1Rbiqurbc+dkpG8g== X-Google-Smtp-Source: AGs4zMabpnZXUWjGiJcItZXVno/ZdrvXC7qjfBQqLLQHGmHHhNl2+8l4OCvlb0haFbUqVvy48kjC2w== X-Received: by 10.200.40.120 with SMTP id 53mr16039696qtr.164.1510602140460; Mon, 13 Nov 2017 11:42:20 -0800 (PST) Original-Received: from [192.168.23.135] (c-73-253-167-23.hsd1.ma.comcast.net. [73.253.167.23]) by smtp.gmail.com with ESMTPSA id g47sm11491501qtk.37.2017.11.13.11.42.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 11:42:19 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3273) 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:139852 Archived-At: On Nov 13, 2017, at 13:06, Noam Postavsky = wrote: > On Mon, Nov 6, 2017 at 2:16 PM, Noam Postavsky > wrote: >> On Mon, Nov 6, 2017 at 2:10 PM, Ken Raeburn = wrote: >>=20 >>> It appears that the emacs-26 version of defun* is happy with it (the >>> original Lisp code I posted, using &optional &key) as well, as long = as I >>> provide the source, or a byte-compiled file from Emacs 25 or 26 >>=20 >> It looks like the cl-defun in newer Emacs throws away the &optional >> for you in this case. >=20 > I think we should make cl-defun reject this kind of code, to be > consistent with plain defun. See attached. I=E2=80=99m of two minds about it=E2=80=A6 it=E2=80=99s a useless but = harmless degenerate case, and based on the link Drew posted and the test = Andreas did, making it an error would be a gratuitous incompatibility = with CL or at least one implementation. And maybe it=E2=80=99s not = entirely useless if it simplifies someone=E2=80=99s macro so that they = can treat zero-or-more optional variables with a single, simple common = code path. But even if we do make it an error, isn=E2=80=99t there = usually a stage where it=E2=80=99s just a warning? (And if we=E2=80=99re going to make that sort of thing an error, we = should probably check whether empty &key or &aux variable lists are = similarly rejected. I haven=E2=80=99t looked.) Also, what the CL macros do going forward is arguably a separate = question from whether byte-code processing should reject the byte code = generated for the same construct by older releases. That=E2=80=99s what = we=E2=80=99ve got now =E2=80=94 Emacs 26.0.90 accepts the forms for CL = macros but rejects them in byte code, and Emacs 24 CL macros produced = such forms in byte code when given such forms as input. So = currently-acceptable code, or at least code still treated as acceptable = under Emacs 25, when compiled by an older release, is no longer = accepted. If the source isn=E2=80=99t going to be rejected (e.g., if = it=E2=80=99s quietly accepted or only produces a warning), then the = byte-code for it probably ought not to be rejected. Ken=