From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#40968: 28.0.50; (apply nil) Date: Wed, 6 May 2020 17:54:23 +0000 Message-ID: References: <83lfm5kvn4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000007e9c8f05a4fe76f8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="83620"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , 40968@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 06 19:56:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWOHD-000LcA-1G for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 19:56:11 +0200 Original-Received: from localhost ([::1]:36498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWOHB-0002Gf-VO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 13:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWOH4-0002EF-5Y for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 13:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWOH3-0001t8-Qk for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 13:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWOH3-0007r7-Pj for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 13:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 May 2020 17:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40968 X-GNU-PR-Package: emacs Original-Received: via spool by 40968-submit@debbugs.gnu.org id=B40968.158878771430136 (code B ref 40968); Wed, 06 May 2020 17:56:01 +0000 Original-Received: (at 40968) by debbugs.gnu.org; 6 May 2020 17:55:14 +0000 Original-Received: from localhost ([127.0.0.1]:41136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOGI-0007q0-Aw for submit@debbugs.gnu.org; Wed, 06 May 2020 13:55:14 -0400 Original-Received: from mail-ot1-f45.google.com ([209.85.210.45]:33887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOGA-0007pH-AK for 40968@debbugs.gnu.org; Wed, 06 May 2020 13:55:12 -0400 Original-Received: by mail-ot1-f45.google.com with SMTP id 72so2112568otu.1 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 10:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gLf1swf4ZJXXJhGaHoYxaT5V6VsJEBd3ddnRWReokcA=; b=HF7g396K1bOZlbWusoyZzohb2Jq3Y68krH7LAlXwVrN4k7U87HKLzVxKVY9ZMT9oLf mTpR95uIF2ascBuY8UZFEU3Y3DN9Scl3E3ziRqb+J/5FcISuVmKNYMjkNCIoTIvnZdaJ E4Dj1T2+RE1n6y7qn7luvc+bGBqqzxnAhlr2iFGaR+dXN1NKziwvfjO7DpVaCd6AckmK h5HnYkJSH1xIO7/S2Ys8pVx/qj2ulAk/s0i591uWO+SfnaKjS+7R9ldswfkFRgNg5Pf2 TF7+cJSLOzNDgQDwJCv6pE64l7SJBjmCeMb2nmcIX3GbUhd2HOAyGIFL61QUtQpx07FG moPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gLf1swf4ZJXXJhGaHoYxaT5V6VsJEBd3ddnRWReokcA=; b=Lfm8Xtzw3mQwtok4RU8rtfhUwoCuuqX9EmbEJ7fwd0t9vGTDRItUt1Yaez8p5iG/nh zbtwtN6h0rNuvtTDv9h1QpxYEjGXFAxygm2RCQroVa0FdXnrfBBuUizJvePJtil5tNj+ IS7CtV8Ad6KCrbF72AhKT4lpylulMZ4eKOxzfqqOaPFjmvGXSHD/DtwkxgDDU7jBHJFd I5ILabI89SyDkdMVD7ku250WSZLHg081dJVKY/uqdhdKHO8mmTQjR/O99+0uAyh2MpAk sIfyp6JNpPtkzkpK9vqOQNQfFl6KU2wFzYkROuRNIUfG79EDS0kA90pynG/+GYtFy4dp YjUg== X-Gm-Message-State: AGi0PubmQPd3yfsoctCuIBI1+IWOnRC6upOAJkl9gYqrhqIr494wweM7 1nc9MsThrBQo6dna9oejcGC3v+1h2W4wrhBMY78= X-Google-Smtp-Source: APiQypK0dLdnhX7FT1fQQpV0pGMCwBD7T2M6iAAFhBO62yrONmzUNYYCqE5+SOAmLiBJMti1igemrofjw0phXYav9wU= X-Received: by 2002:a9d:5f04:: with SMTP id f4mr8159390oti.154.1588787700191; Wed, 06 May 2020 10:55:00 -0700 (PDT) In-Reply-To: <83lfm5kvn4.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179830 Archived-At: --0000000000007e9c8f05a4fe76f8 Content-Type: text/plain; charset="UTF-8" On Wed, May 6, 2020 at 2:04 PM Eli Zaretskii wrote: > 'apply' is a very popular function, and is used very widely. I won't > be surprised if there were more of these usage cases that would be > broken by such a change in the signature. > Can we instead identify the problematic usage and signal an error? Yes. What we also have to do is fix the documentation, and fix the byte optimizer. Here's a first suggestion. I'd particularly appreciate hints on better wording for the documentation. --0000000000007e9c8f05a4fe76f8 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Handle-single-argument-apply-consistently-bug-40968.patch" Content-Disposition: attachment; filename="0001-Handle-single-argument-apply-consistently-bug-40968.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k9vn2mzh0 RnJvbSBmYTgxOTA0NTc2NmY1MGM1NWY5YmI1ODhlY2Y3ZTBiZWY2YTU2ZDQxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBXZWQs IDYgTWF5IDIwMjAgMTc6NDY6NTYgKzAwMDAKU3ViamVjdDogW1BBVENIXSBIYW5kbGUgc2luZ2xl LWFyZ3VtZW50IGBhcHBseScgY29uc2lzdGVudGx5IChidWcjNDA5NjgpCgotLS0KIGRvYy9saXNw cmVmL2Z1bmN0aW9ucy50ZXhpICB8ICA5ICsrKysrKysrKwogbGlzcC9lbWFjcy1saXNwL2J5dGUt b3B0LmVsIHwgMjkgKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0KIHNyYy9ldmFsLmMgICAg ICAgICAgICAgICAgICB8ICA1ICsrKysrCiAzIGZpbGVzIGNoYW5nZWQsIDMwIGluc2VydGlvbnMo KyksIDEzIGRlbGV0aW9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