From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'? Really? Date: Mon, 13 Sep 2021 15:17:56 +0300 Message-ID: <83ilz4ekjv.fsf@gnu.org> References: <97d3ff2c-9e72-4004-88a9-08130ac99a74@default> <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> <0d48a2308486fe146f77@heytings.org> <87a6khj6s5.fsf@gnus.org> <97113ce8badac94c846f@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, hmelman@gmail.com, 21695@debbugs.gnu.org, rms@gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 13 15:07:00 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 1mPlfl-0008fs-01 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 15:06:57 +0200 Original-Received: from localhost ([::1]:49100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPlfi-0006XZ-W1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 09:06:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPkvO-0000Vt-85 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 08:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPkvN-0003GW-P4 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 08:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPkvN-0000IB-Kl for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 08:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2021 12:19: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.16315355021053 (code B ref 21695); Mon, 13 Sep 2021 12:19:01 +0000 Original-Received: (at 21695) by debbugs.gnu.org; 13 Sep 2021 12:18:22 +0000 Original-Received: from localhost ([127.0.0.1]:44577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPkuk-0000Gv-6G for submit@debbugs.gnu.org; Mon, 13 Sep 2021 08:18:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPkui-0000GH-Of for 21695@debbugs.gnu.org; Mon, 13 Sep 2021 08:18:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34652) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPkud-0002Zr-Ca; Mon, 13 Sep 2021 08:18:15 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1515 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPkuR-0006C6-81; Mon, 13 Sep 2021 08:18:03 -0400 In-Reply-To: <97113ce8badac94c846f@heytings.org> (message from Gregory Heytings on Mon, 13 Sep 2021 09:11:11 +0000) 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:214220 Archived-At: > Date: Mon, 13 Sep 2021 09:11:11 +0000 > From: Gregory Heytings > Cc: 21695@debbugs.gnu.org, hmelman@gmail.com, rms@gnu.org > > > >> + if (!EQ (plist, Qnil) && !NILP (Fplist_get (plist, Qcustom_set))) > >> + safe_call2 (Qdisplay_warning, Qsetq, > >> + CALLN (Fformat, > >> + build_string > >> + ("`%s' should be set with `customize-set-variable'"), > >> + sym)); > > > > I haven't tried the patch, but won't this be triggered by the code > > that's handling the variables? For instance, `latin1-display' has a > > :set, but the file itself does `(setq latin1-display t)' etc. (This is > > a very common pattern.) > > > > No, (latin1-display 'latin-2) does not raise a warning with the patch, > because latin1-disp.el is bytecompiled, and Fsetq is not used when > bytecompiled code is executed (bytecompiled code only uses Fset). So the warning will not be shown for byte-compiled code? I think it might be not a good idea, as many users byte-compile their init files. > That being said, I would say that using (setq latin1-display t) when > latin1-display has a :set is always a bug, in the init file, > interactively, or in built-in code (bytecompiled or not), and that (set > 'latin1-display t) should be used instead. WDYT? I think forcing people to use 'set' instead is too much of a punishment.