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#54329: 28.0.91; custom-prompt-customize-unsaved-options does not return nil Date: Thu, 10 Mar 2022 19:09:49 +0200 Message-ID: <835yolentu.fsf@gnu.org> References: <878rthhjae.fsf@whxvd.name> 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="22677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54329@debbugs.gnu.org To: Sebastian Miele Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 10 18:10:44 2022 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 1nSMJI-0005lB-Bw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Mar 2022 18:10:44 +0100 Original-Received: from localhost ([::1]:33462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSMJH-0005g3-8D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Mar 2022 12:10:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSMIg-0005fa-GE for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2022 12:10:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41517) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nSMIc-0002AS-Mt for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2022 12:10:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nSMIc-00013y-8A for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2022 12:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Mar 2022 17:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54329 X-GNU-PR-Package: emacs Original-Received: via spool by 54329-submit@debbugs.gnu.org id=B54329.16469321984073 (code B ref 54329); Thu, 10 Mar 2022 17:10:02 +0000 Original-Received: (at 54329) by debbugs.gnu.org; 10 Mar 2022 17:09:58 +0000 Original-Received: from localhost ([127.0.0.1]:35414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSMIY-00013b-5S for submit@debbugs.gnu.org; Thu, 10 Mar 2022 12:09:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSMIW-00013P-I3 for 54329@debbugs.gnu.org; Thu, 10 Mar 2022 12:09:57 -0500 Original-Received: from [2001:470:142:3::e] (port=59620 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSMIR-00025N-5W; Thu, 10 Mar 2022 12:09:51 -0500 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=NlQqqCaH11hC1+DlLbxJSE5t461IRGP8FMfv1Lnh8oQ=; b=Y6KPHYUtCeUSQOeKEsUx 7sA0M50qWupU0ItqRqDbWSJ6Pmz9UaAZklDOag4VJ6vGj/ryailwwY7UYYk0Vp3XSwO4ivi09qMWk S5Hyd5gtCvEJL0dfI2oXy8d/AJV1gRrfMsU5eGgU+yhGGn9thZCX8WzfN6ROzXEeDR7Xb3f1AXT/0 LdADq3aX+Gy5dMXMIg++z/s0rDh7QVTO7JimyjayaxWQvUcAVqIuRkOGIQI2qBJKLDcYOsoLfl1oW Woe4TZ49pxwTdpmR3gamxYP67qz4YRhstWw8inopCuvBIX1stsFMDKDXD1SNv1bjg9vWCz2Ahi4ZJ 5t1KBkoA4Blf2A==; Original-Received: from [87.69.77.57] (port=4412 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 1nSMIQ-0002tz-Hg; Thu, 10 Mar 2022 12:09:50 -0500 In-Reply-To: <878rthhjae.fsf@whxvd.name> (message from Sebastian Miele on Thu, 10 Mar 2022 17:19:07 +0100) 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:228197 Archived-At: > From: Sebastian Miele > Date: Thu, 10 Mar 2022 17:19:07 +0100 > > In an emacs -Q, evaluate > > (add-hook 'kill-emacs-query-functions > 'custom-prompt-customize-unsaved-options) > > (progn > ;; Somthing like the following may be done, e.g., by > ;; ‘activate-transient-input-method’: > (setq default-transient-input-method "TeX") > (customize-mark-as-set 'default-transient-input-method)) > > and hit C-x C-c. When asked about whether to examine the unsaved > options, say yes. > > Expected: Emacs does not terminate, so that I can examine. > > Actual behavior: Emacs terminates. > > The following diff fixes this issue (and a documentation bug): > > diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el > index c2ddaeb7b1..77840c4b65 100644 > --- a/lisp/cus-edit.el > +++ b/lisp/cus-edit.el > @@ -1531,12 +1531,11 @@ customize-apropos-groups > ;;;###autoload > (defun custom-prompt-customize-unsaved-options () > "Prompt user to customize any unsaved customization options. > -Return non-nil if user chooses to customize, for use in > +Return nil if user chooses to customize, for use in If you want to prevent Emacs from terminating, you can simply return nil from your hook function. I see no reason to change the semantics of the return value for a single use case: this function was evidently assuming a different use case, and it exists in this shape long enough to prevent us to change its behavior in such a radical way. Thanks.