From unknown Sun Jun 22 03:56:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15718: 24.3.50; `C-M-x' does not work, with `defcustom' inside `when' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Oct 2013 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 15718@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13827159257231 (code B ref -1); Fri, 25 Oct 2013 15:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Oct 2013 15:45:25 +0000 Received: from localhost ([127.0.0.1]:43649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZjZj-0001sR-7k for submit@debbugs.gnu.org; Fri, 25 Oct 2013 11:45:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55356) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZjZg-0001s5-QU for submit@debbugs.gnu.org; Fri, 25 Oct 2013 11:45:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZjZR-0005IM-Dh for submit@debbugs.gnu.org; Fri, 25 Oct 2013 11:45:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZjZR-0005IG-B5 for submit@debbugs.gnu.org; Fri, 25 Oct 2013 11:45:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZjZI-00029x-PK for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2013 11:45:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZjZA-00057L-6o for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2013 11:44:56 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:39556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZjZA-000577-0s for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2013 11:44:48 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9PFikpB013343 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 25 Oct 2013 15:44:46 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9PFijvq009957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Oct 2013 15:44:46 GMT Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9PFijh7009945 for ; Fri, 25 Oct 2013 15:44:45 GMT MIME-Version: 1.0 Message-ID: <07396814-cb70-42aa-b3e1-a3c4449ad43b@default> Date: Fri, 25 Oct 2013 08:44:44 -0700 (PDT) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) emacs -Q (when t (defcustom foo nil "..." :type boolean)) M-x set-variable foo t Put point on foo in the defcustom sexp, and do `C-M-x'. `foo' is echoed in the echo area, giving you the impression that the defcustom was reevaluated, reinitializing `foo'. C-h v foo ;; =3D> t, not nil. Without the `when', i.e., with the `defcustom' at top level, the value is nil, as a user would expect. In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-10-19 on LEG570 Bzr revision: 114715 rgm@gnu.org-20131019023520-s8mwtib7xcx9e05w Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG= =3D1' From unknown Sun Jun 22 03:56:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15718: 24.3.50; `C-M-x' does not work, with `defcustom' inside `when' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2019 02:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 15718@debbugs.gnu.org Received: via spool by 15718-submit@debbugs.gnu.org id=B15718.156583783110104 (code B ref 15718); Thu, 15 Aug 2019 02:58:01 +0000 Received: (at 15718) by debbugs.gnu.org; 15 Aug 2019 02:57:11 +0000 Received: from localhost ([127.0.0.1]:50189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy5ws-0002cr-Vs for submit@debbugs.gnu.org; Wed, 14 Aug 2019 22:57:11 -0400 Received: from quimby.gnus.org ([80.91.231.51]:33454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy5wr-0002cj-By for 15718@debbugs.gnu.org; Wed, 14 Aug 2019 22:57:09 -0400 Received: from 24-104-73-23-ip-static.hfc.comcastbusiness.net ([24.104.73.23] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hy5wm-00075Q-O5; Thu, 15 Aug 2019 04:57:07 +0200 From: Lars Ingebrigtsen References: <07396814-cb70-42aa-b3e1-a3c4449ad43b@default> Date: Wed, 14 Aug 2019 19:57:02 -0700 In-Reply-To: <07396814-cb70-42aa-b3e1-a3c4449ad43b@default> (Drew Adams's message of "Fri, 25 Oct 2013 08:44:44 -0700 (PDT)") Message-ID: <877e7f5e69.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > emacs -Q > > (when t > (defcustom foo nil > "..." > :type boolean)) > > M-x set-variable foo t > > Put point on foo in the defcustom sexp, and do `C-M-x'. `foo' is echoed > in the echo area, giving [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: > emacs -Q > > (when t > (defcustom foo nil > "..." > :type boolean)) > > M-x set-variable foo t > > Put point on foo in the defcustom sexp, and do `C-M-x'. `foo' is echoed > in the echo area, giving you the impression that the defcustom was > reevaluated, reinitializing `foo'. > > C-h v foo ;; =3D> t, not nil. > > Without the `when', i.e., with the `defcustom' at top level, the value > is nil, as a user would expect. I think this works as documented: -- Evaluate the top-level form containing point, or after point. If the current defun is actually a call to =E2=80=98defvar=E2=80=99 or =E2= =80=98defcustom=E2=80=99, evaluating it this way resets the variable using its initial value expression (using the defcustom=E2=80=99s :set function if there is one), e= ven if the variable already has some other value. (Normally =E2=80=98defvar=E2= =80=99 and =E2=80=98defcustom=E2=80=99 do not alter the value if there already is one.) -- So only if the def* is top-level does the magic DWIM value-setting thing happen. Closing. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 22:57:18 2019 Received: (at control) by debbugs.gnu.org; 15 Aug 2019 02:57:18 +0000 Received: from localhost ([127.0.0.1]:50192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy5x0-0002dH-A8 for submit@debbugs.gnu.org; Wed, 14 Aug 2019 22:57:18 -0400 Received: from quimby.gnus.org ([80.91.231.51]:33468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy5wy-0002dA-Ul for control@debbugs.gnu.org; Wed, 14 Aug 2019 22:57:17 -0400 Received: from 24-104-73-23-ip-static.hfc.comcastbusiness.net ([24.104.73.23] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hy5wv-00075b-Ur for control@debbugs.gnu.org; Thu, 15 Aug 2019 04:57:16 +0200 Date: Wed, 14 Aug 2019 19:57:11 -0700 Message-Id: <875zmz5e60.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #15718 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 15718 notabug close 15718 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 15718 notabug close 15718 quit From unknown Sun Jun 22 03:56:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15718: 24.3.50; `C-M-x' does not work, with `defcustom' inside `when' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2019 04:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Lars Ingebrigtsen Cc: 15718@debbugs.gnu.org Received: via spool by 15718-submit@debbugs.gnu.org id=B15718.15658441084087 (code B ref 15718); Thu, 15 Aug 2019 04:42:01 +0000 Received: (at 15718) by debbugs.gnu.org; 15 Aug 2019 04:41:48 +0000 Received: from localhost ([127.0.0.1]:50337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy7a8-00013r-6E for submit@debbugs.gnu.org; Thu, 15 Aug 2019 00:41:48 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:53714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy7a5-00013b-DL for 15718@debbugs.gnu.org; Thu, 15 Aug 2019 00:41:46 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7F4crGi002534; Thu, 15 Aug 2019 04:41:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=76Xo4sIzaFyhZlnHY7TGFXiJc4SqgJ/Qvb8fAHHDskM=; b=A42qli7cU4Bl6WefGYiSQDXqwTUyR/kfgZvg6KvPn7yXzJLtgMHYLVwUSoeVYfkovlrZ gdnwy+7lNUHHQreeM3KuRZz/nBi1KjPnxLhTlxpkgArsxENH6v6JoLwT4dHygl5nuk+Y k7/w9OQVDNH9HCRkQJ49y+BQh96D4Kb3NpBbqPxlAdbNmZ0j2As0vCMgLAhz9DhczrGd 3zC0MWtQNFBLP+R2CW8TrGFz7riHD0vqCuS+iwibB9VMvkdL8MDcqeXDZIu+f++v5kXT FxgFknMp8z5SKqERBzo4Az7qGjVAowoK9aMMCJjx4a1r7qm7NDKBKh5pH9fLWWhTyI6I tQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2u9nbtrr4s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Aug 2019 04:41:39 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7F4bhf1008663; Thu, 15 Aug 2019 04:41:39 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2ucgf0khdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Aug 2019 04:41:39 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x7F4fc0M024032; Thu, 15 Aug 2019 04:41:38 GMT MIME-Version: 1.0 Message-ID: <8ca67758-a213-4172-a029-defe1fc552c8@default> Date: Wed, 14 Aug 2019 21:41:37 -0700 (PDT) From: Drew Adams References: <07396814-cb70-42aa-b3e1-a3c4449ad43b@default> <877e7f5e69.fsf@mouse.gnus.org> In-Reply-To: <877e7f5e69.fsf@mouse.gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4873.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9349 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908150048 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9349 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908150048 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > emacs -Q > > > > (when t > > (defcustom foo nil > > "..." > > :type boolean)) > > > > M-x set-variable foo t > > > > Put point on foo in the defcustom sexp, and do `C-M-x'. `foo' is > echoed > > in the echo area, giving you the impression that the defcustom was > > reevaluated, reinitializing `foo'. > > > > C-h v foo ;; =3D> t, not nil. > > > > Without the `when', i.e., with the `defcustom' at top level, the > value > > is nil, as a user would expect. >=20 > I think this works as documented: >=20 > -- > Evaluate the top-level form containing point, or after point. ^^^^^^^^^^^^^^^^^^ >=20 > If the current defun is actually a call to =E2=80=98defvar=E2=80=99 or = =E2=80=98defcustom=E2=80=99, > evaluating it this way resets the variable using its initial value > expression (using the defcustom=E2=80=99s :set function if there is one),= even > if the variable already has some other value. (Normally =E2=80=98defvar= =E2=80=99 and > =E2=80=98defcustom=E2=80=99 do not alter the value if there already is on= e.) > -- >=20 > So only if the def* is top-level does the magic DWIM value-setting > thing happen. Yes. That's the problem. This is an enhancement request - a request that it instead work not just at the top level. What's the reason why it should not "work" when inside, say, `when'? AFAIK, that feature just hasn't been implemented yet. Hence this request. =20 > Closing. Unfortunate.