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#64046: 30.0.50; Quoting in customize choice tags Date: Tue, 13 Jun 2023 18:56:36 +0300 Message-ID: <837cs7we2z.fsf@gnu.org> References: <87v8frihny.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21653"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64046@debbugs.gnu.org To: Stephen Berman , Mauro Aranda , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 13 17:57:24 2023 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 1q96Oa-0005TM-ET for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jun 2023 17:57:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q96OG-0002KU-9y; Tue, 13 Jun 2023 11:57:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q96OE-0002K2-Qf for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q96OE-00035X-IW for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q96OE-0003D8-CY for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64046 X-GNU-PR-Package: emacs Original-Received: via spool by 64046-submit@debbugs.gnu.org id=B64046.168667178612296 (code B ref 64046); Tue, 13 Jun 2023 15:57:02 +0000 Original-Received: (at 64046) by debbugs.gnu.org; 13 Jun 2023 15:56:26 +0000 Original-Received: from localhost ([127.0.0.1]:42823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q96Ne-0003CF-5l for submit@debbugs.gnu.org; Tue, 13 Jun 2023 11:56:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q96Nc-0003C3-CI for 64046@debbugs.gnu.org; Tue, 13 Jun 2023 11:56:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q96NW-0002xK-FN; Tue, 13 Jun 2023 11:56:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ocQ2vxtlTmPx57K6kGnDAspWwGTet4YlelE0ThvWLbE=; b=hhVoP9PaOX1LesZRzqBT ujzdiZ5QGG2V84Jedd9QzdcgtJiDb5qdRItg8V8Ou2Hbi/OSdekQAF4PDK7SFQkrAebcgFx8GIglE /4h2bk9ZO14fiwQaus6RfBUjBKA9X7UdQqWmQC50pjB7+eB7UHkHZPK1hDNkpIXDHq+4ILYqMbewg SIqU+pk5lej1+gEjM59e7pRL2HJgXyM2SGzbYs7Da0+kIam/ySHl9krE8rLeW+cmff6FPYC5OJlDB qHg2hPU4DhLZylteL4bMnP2JLQN0RSf/ebOidzrguJWguaKkaS3BQaFtydZ61BZ8uKcxaKe6tBqTf kzsRZxJyAGItkQ==; Original-Received: from [87.69.77.57] (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 1q96NV-00086n-VM; Tue, 13 Jun 2023 11:56:18 -0400 In-Reply-To: <87v8frihny.fsf@gmx.net> (message from Stephen Berman on Tue, 13 Jun 2023 16:02:57 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263330 Archived-At: > From: Stephen Berman > Date: Tue, 13 Jun 2023 16:02:57 +0200 > > 0. emacs -Q > 1. Evaluate the following defcustom: > (defcustom my-test "a" > "Test." > :type '(choice (string :tag "Use `a'" "a") > (string :tag "Use `b'" "b"))) > 2. M-x customize-option RET my-test RET > 3. In the buffer *Customize Option: My Test* note that in the string > "Use ‘a’" following the "Value Menu" button the quote marks are in > the "curve" style (‘’). > 4. Put point on the "Value Menu" button and type RET. > 5. The buffer " widget-choose" contains these lines: > 0 = Use ‘a’ > 1 = Use ‘b’ > Note that the quote marks in this buffer are also in the "curve" > style. > 6. With the mouse pointer over the "Value Menu" button press mouse-1, > popping up a menu titled "Choice" containing these items: > Use `a' > Use `b' > Note that the quote marks in this menu are in the "grave" style (`') > instead of the "curve" style. > > The use of the "curve" style in the " widget-choose" buffer is due to > commit bd3b426ebb7a60045839e97c9da9bfd249fab1f1, but that commit did not > take popup menus into account. The attached patch does so. Since the > status quo ante long predates emacs-29 and this is just a stylistic bug, > I made the patch against master. > > In this patch I chose to apply substitute-command-keys just once at the > beginning of the function `widget-choose', rather than several times > within the function, but I restricted its application to item tags, so > other uses of the ITEMS argument should not be affected (and my brief > testing hasn't found any problem with the patch). > > The patch also takes the opportunity to replace two unnecessary uses of > `let*' in `widget-choose', in one case by `let' and in the other by > foregoing let-bound variables altogether and just using the values in > place, since they occur only once each in the lines immediately > following the eliminated `let*'. Thanks. I'm not familiar very well with widgets code, so I added Mauro and Stefan to the discussion, in the hope that they will have useful comments.