From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'? Really? Date: Sun, 12 Sep 2021 21:26:18 +0000 Message-ID: <0d48a2308486fe146f77@heytings.org> References: <97d3ff2c-9e72-4004-88a9-08130ac99a74@default> <838s0fpixr.fsf@gnu.org> <83k0jtr45c.fsf@gnu.org> <87v93avtoe.fsf@gnus.org> <87r1dyvtav.fsf@gnus.org> <87mtolx6de.fsf@gnus.org> <87ilz9x5c8.fsf@gnus.org> <87y284rb1z.fsf@gnus.org> <0d48a23084a8b0435f37@heytings.org> <83h7eqf9wx.fsf@gnu.org> <0d48a230848de1d1b255@heytings.org> <83ee9uf82a.fsf@gnu.org> <0d48a23084cf7a569554@heytings.org> <83czpef6hj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Qe2reUK4Dh" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, hmelman@gmail.com, 21695@debbugs.gnu.org, rms@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 12 23:27:11 2021 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 1mPX0J-000AFE-3d for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 23:27:11 +0200 Original-Received: from localhost ([::1]:53722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPX0H-00045g-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 17:27:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPX0A-00045C-9z for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 17:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPX09-0003UX-VJ for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 17:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPX09-0003pe-Np for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 17:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Sep 2021 21:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21695 X-GNU-PR-Package: emacs Original-Received: via spool by 21695-submit@debbugs.gnu.org id=B21695.163148198414687 (code B ref 21695); Sun, 12 Sep 2021 21:27:01 +0000 Original-Received: (at 21695) by debbugs.gnu.org; 12 Sep 2021 21:26:24 +0000 Original-Received: from localhost ([127.0.0.1]:43621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPWzY-0003oo-8G for submit@debbugs.gnu.org; Sun, 12 Sep 2021 17:26:24 -0400 Original-Received: from heytings.org ([95.142.160.155]:57834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPWzU-0003od-JQ for 21695@debbugs.gnu.org; Sun, 12 Sep 2021 17:26:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1631481979; bh=Ik3fxMmFNfnwp1sAbq/eLduGQ4RbJQ+9T1FeVoLqhgw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=TxtqpC5uKtp7eybHofb/U30fgukDP+GKC9/zlg9eijlhJzkzW418KHHDM7mkEJk2I yi6yCNesrg4VXy/S6gA+oRwBbgWWvzxXLLEB2hZyCvm/XXjyErMytQDiJPsP579FnA /A8slVF96LZsMS+yveb8VdUY6Gqi26i8GjBywr7Q0TrCbrzrro2KTqXAkwQDrmBuvk T2mF88oFJyDWO89lMUOU1AoUCWASzYgrusgX4HPmzaDAi5r6PADIRPPUFGh+CpHlT+ 10vKPdDT66P/l/F0zg0VEcEBmXUb42Wgkr3cM2Ev17cLn3Iash3+awdD45DvxTXtOK K/QbW2AJH+AUA== In-Reply-To: <83czpef6hj.fsf@gnu.org> Content-ID: <0d48a230848b283ed8c2@heytings.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:214165 Archived-At: --Qe2reUK4Dh Content-Type: text/plain; charset=us-ascii; format=flowed Content-ID: <0d48a230845f7baf35e5@heytings.org> >> The difference is that while Emacs is being built, especially >> bootstrapped, calls to Lisp code that isn't preloaded by autoload.el >> could fail. So such calls need to be careful not to call a symbol if >> the call could fail, or at least use internal_condition_case* functions >> to protect themselves against failure. > > Basically, you should use safe_call and its ilk. > Thank you for that clarification, done. > > Even then, some people will frown on 20% slowdown of the startup. > It is not a slowdown of the startup, it is a slowdown of setq, which becomes visible for the user when say 100 million setq's are executed. Anyway, given your remark, I improved the patch. With this optimized version, there is no noticeable difference for variables without a plist (~40 nanoseconds for each call to setq, with and without the patch), and a small difference for variables with a plist (~40 nanoseconds for each call to setq without the patch, ~42 nanoseconds with the patch). --Qe2reUK4Dh Content-Type: text/x-diff; name=Warn-when-custom-variable-is-wrongly-set.patch; charset=us-ascii Content-Transfer-Encoding: base64 Content-ID: <0d48a23084f30cb35b7e@heytings.org> Content-Description: Content-Disposition: attachment; filename=Warn-when-custom-variable-is-wrongly-set.patch RnJvbSAxZjgxYWQ2YzEyZTQ0OTRjM2E2NDM0YjU1OTIzYTZlNGJlM2IzOGZi IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBTdW4sIDEyIFNl cCAyMDIxIDIxOjEwOjA4ICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIFdhcm4g d2hlbiBjdXN0b20gdmFyaWFibGUgaXMgd3JvbmdseSBzZXQuDQoNCiogc3Jj L2V2YWwuYyAoRnNldHEpOiBEaXNwbGF5IHdhcm5pbmcgd2hlbiBhIGN1c3Rv bSB2YXJpYWJsZSB3aXRoIGEgOnNldA0KcHJvcGVydHkgaXMgc2V0IHdpdGgg c2V0cS4gIFdhcm5pbmdzIGFyZSBkaXNwbGF5ZWQgb25seSBmb3IgY3VzdG9t IHZhcmlhYmxlcw0Kd2hvc2UgZmlsZXMgaGF2ZSBiZWVuIGxvYWRlZCBhbmQg dGhhdCBoYXZlIGEgOnNldCBwcm9wZXJ0eS4gIE5vIHdhcm5pbmdzIGFyZQ0K ZGlzcGxheWVkIGZvciBjdXN0b20gdmFyaWFibGVzIHdob3NlIGZpbGVzIGhh dmUgbWVyZWx5IGJlZW4gcHJlbG9hZGVkLA0KZm9yIGN1c3RvbSB2YXJpYWJs ZXMgdGhhdCBkbyBub3QgaGF2ZSBhIDpzZXQgcHJvcGVydHksIGFuZCBmb3Ig bm9uLWN1c3RvbQ0KdmFyaWFibGVzLiAgU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