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: Mon, 13 Sep 2021 13:00:15 +0000 Message-ID: <97113ce8baf7455e6f58@heytings.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> <87fsu8esvg.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8156"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 21695@debbugs.gnu.org, hmelman@gmail.com, rms@gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 13 15:24:33 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 1mPlwm-0001qV-Rq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 15:24:33 +0200 Original-Received: from localhost ([::1]:56826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPlwl-0006BJ-Mz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 09:24:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPla3-0008Ud-2o for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 09:01:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33098) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPla2-0006X1-1N for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 09:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPla1-0003hv-Vl for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 09:01: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: Mon, 13 Sep 2021 13:01: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.163153801814182 (code B ref 21695); Mon, 13 Sep 2021 13:01:01 +0000 Original-Received: (at 21695) by debbugs.gnu.org; 13 Sep 2021 13:00:18 +0000 Original-Received: from localhost ([127.0.0.1]:44644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPlZJ-0003gg-RA for submit@debbugs.gnu.org; Mon, 13 Sep 2021 09:00:18 -0400 Original-Received: from heytings.org ([95.142.160.155]:58702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPlZI-0003gY-Ak for 21695@debbugs.gnu.org; Mon, 13 Sep 2021 09:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1631538015; bh=rwMVWaTQP9zGXX8b5kfq25Q1fQygkXvXxxK1BDjpOuU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=LpXRtEsVFF8rbs/M4Oi1Cn2nuWJ9os5HSnsU7Y0pFJTNGIxFKnlngxKNBTmsQMhp/ qXw5p4exMrgwhL88tBEOlA2gcLZSZZdxERj2RkwXon79tI5XwHpULV8D2N2DvMFwWT jxmq7DFXb2Ry80mQrilXcPbJpT3TkQOofFwguXRPhjgysPIj1z0s93KLH/2pUNJhsr QVI7X+sPyPMTBERo3qyf9lnsnnxoNwWjwZ/W4Z/Ou2CesNMNCxlAtZRJk9mkeqAZIB Bq2v0GqOMfC+TcGZuba9NaHzApbQLvpoz099tK9iV1IMuNWKqFayeGLNFvEb0Jo5rI ySvIHkJu9TcdQ== In-Reply-To: <87fsu8esvg.fsf@gnus.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:214225 Archived-At: >> 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 have not studied the code -- I just picked a variable at random. The > point is that code in a package will commonly use setq on the user > options to implement the code, and this is how it should be. > My point is that code that sets a user option that has a :set should set it with (set 'foo val) instead of (setq foo val). I just checked: on the current trunk, there are 331 defcustoms with a :set. Out of these, only 49 are set with setq, 33 only at one place, and 16 more than once. That would require changing 85 setq's into set's. > > (Also note that your patch will issue a bunch of warnings if the user > does an `eval-buffer' after loading .emacs into a buffer and then > evaling it (in a running Emacs).) > There are not that many custom variables that will behave differently when the init file is first loaded and when it is eval-buffer'd. AFAICS this will only happen for variables whose files have been loaded in the meantime after they have been setq'd.