From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable' Date: Fri, 16 Oct 2015 14:50:04 -0700 (PDT) Message-ID: <97d3ff2c-9e72-4004-88a9-08130ac99a74@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445032293 18611 80.91.229.3 (16 Oct 2015 21:51:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Oct 2015 21:51:33 +0000 (UTC) To: 21695@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 16 23:51:20 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZnCuF-0001em-7N for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Oct 2015 23:51:19 +0200 Original-Received: from localhost ([::1]:56029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnCuE-0006fv-Od for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Oct 2015 17:51:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnCu8-0006fF-RY for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 17:51:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnCty-0002ki-Aq for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 17:51:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnCty-0002kc-7V for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 17:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZnCty-0001YR-4F for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 17:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Oct 2015 21:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21695 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14450322155916 (code B ref -1); Fri, 16 Oct 2015 21:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Oct 2015 21:50:15 +0000 Original-Received: from localhost ([127.0.0.1]:53691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnCtC-0001XM-Da for submit@debbugs.gnu.org; Fri, 16 Oct 2015 17:50:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33441) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnCtB-0001XG-0E for submit@debbugs.gnu.org; Fri, 16 Oct 2015 17:50:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnCtA-00022S-04 for submit@debbugs.gnu.org; Fri, 16 Oct 2015 17:50:12 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnCt9-00022J-Ti for submit@debbugs.gnu.org; Fri, 16 Oct 2015 17:50:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnCt9-0006cI-1d for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 17:50:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnCt5-0001wo-Rn for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 17:50:10 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:30374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnCt5-0001ve-LH for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 17:50:07 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t9GLo6GN014558 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Oct 2015 21:50:06 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t9GLo6EW017724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 16 Oct 2015 21:50:06 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t9GLo56b006059 for ; Fri, 16 Oct 2015 21:50:06 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107690 Archived-At: Please (case by case) change examples that use `setq' to set an option value, so that they instead use one of the Customize functions (`customize-set-variable', `custom-set-variables', etc.). Using `setq' in an init file to set option values is error prone. It is not a good habit to develop, because (1) there are some options whose `defcustom's use `:set', `:initialize' etc. (and `setq' ignores such), and (2) `setq' does no type checking. There are currently no occurrences of `customize-set-variable' or `custom-set-variables' in the Emacs manual. There are lots of uses of `setq' in the Emacs manual. Yet many (most?) of them are for setting user-option values. No distinction is made between setting options and other variables (`defvar's). Sure, many `defcustom's have a simple `:type' and no `:set' or `:initialize' etc., so in practice it often does not really matter whether you use `setq' or one of the Customize functions to set the value. Still, the manual should set a good example, and it is better to not get in the habit of assuming that `setq' is sufficient to properly set a user option. I've see questions about this from users many times. (Most often it is a problem with type and not with setter or initializer functions.) It is often not obvious (how should it be) to users what is wrong when they get into trouble by using `setq'. In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2015-10-06 Bzr revision: a4a98a1b2568793ead43e824ecf227768759df12 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include''