From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15718: 24.3.50; `C-M-x' does not work, with `defcustom' inside `when' Date: Wed, 14 Aug 2019 21:41:37 -0700 (PDT) Message-ID: <8ca67758-a213-4172-a029-defe1fc552c8@default> References: <07396814-cb70-42aa-b3e1-a3c4449ad43b@default> <877e7f5e69.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="85090"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 15718@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 15 06:42:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hy7aV-000M0a-6q for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 06:42:11 +0200 Original-Received: from localhost ([::1]:38356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hy7aT-00035e-LA for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 00:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37779) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hy7aN-00035L-1L for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 00:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hy7aM-0007zh-0h for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 00:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hy7aL-0007za-TB for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 00:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hy7aL-00014I-Pd for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 00:42:01 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 15718-submit@debbugs.gnu.org id=B15718.15658441084087 (code B ref 15718); Thu, 15 Aug 2019 04:42:01 +0000 Original-Received: (at 15718) by debbugs.gnu.org; 15 Aug 2019 04:41:48 +0000 Original-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 Original-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 Original-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== Original-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 Original-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 Original-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 Original-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 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)] 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:165041 Archived-At: > > 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.