From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sebastian Miele Newsgroups: gmane.emacs.bugs Subject: bug#54329: 28.0.91; custom-prompt-customize-unsaved-options does not return nil Date: Thu, 10 Mar 2022 18:17:02 +0100 Message-ID: <87v8wlg05i.fsf@whxvd.name> References: <878rthhjae.fsf@whxvd.name> <835yolentu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30827"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54329@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 10 18:59:19 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 1nSN4I-0007sk-HW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Mar 2022 18:59:18 +0100 Original-Received: from localhost ([::1]:56788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSN4H-0003Aq-BY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Mar 2022 12:59:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSN44-00036m-Mm for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2022 12:59:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41554) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nSN42-0001VJ-HL for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2022 12:59:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nSN42-0002OZ-G5 for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2022 12:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sebastian Miele Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Mar 2022 17:59: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.16469351119161 (code B ref 54329); Thu, 10 Mar 2022 17:59:02 +0000 Original-Received: (at 54329) by debbugs.gnu.org; 10 Mar 2022 17:58:31 +0000 Original-Received: from localhost ([127.0.0.1]:35451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSN3W-0002Ng-QS for submit@debbugs.gnu.org; Thu, 10 Mar 2022 12:58:31 -0500 Original-Received: from mout-p-101.mailbox.org ([80.241.56.151]:34242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSN3U-0002NQ-Au for 54329@debbugs.gnu.org; Thu, 10 Mar 2022 12:58:28 -0500 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [80.241.60.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4KDxcs4Sq1z9skM; Thu, 10 Mar 2022 18:58:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whxvd.name; s=MBO0001; t=1646935099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PDZqvvT6KuMdSic5l+bkjB5N7u1NCAqPQ0dphCnmIHQ=; b=LEjAfvu9o+ENM3ipnp/TnrO6r+FAdnJIFt41pKjbKO9X+noQufFbabsPhMq6q0BXfeqXHf yGlYg0Ed3vwTxS2gGAquyimFZoreNyd815mPFpUo9/MxvasdwzEQsULrjimWjoHNWsx6Z/ 99ofL1OJn20+ZzzZwWMHQoZj1KkZs8MEFXfTWJchBJs48Jh+pG7tTG4iIhqFYYbZ/X0MNS qpBireqLHwzLGIXy1iBN275Qe+pjo4B7SD62/AxCMoQg3Coz8zwUWzXc+IcTtcKdwjfJex ++ioec3xEKfFxwR3mFYVkHCw7FyAVCHnwq3DaAuMGJuJctABtIG+xXqZm/n9iw== In-reply-to: <835yolentu.fsf@gnu.org> 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:228200 Archived-At: Hi Eli, Eli Zaretskii : > 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. This is not about me wanting to change the behavior of =E2=80=98custom-prompt-customize-unsaved-options=E2=80=99. It definitely i= s a bug in Emacs 28. The definition (defun custom-prompt-customize-unsaved-options () (not (and (custom-unsaved-options) (yes-or-no-p "Some customized options have not been saved; Ex= amine? ") (customize-unsaved) t))) seems to be unchanged from Emacs 27.2 to Emacs 28. However, in Emacs 27.2, it did work as I expect and as I understand the Emacs manual: Please note that any customizations you have not chosen to save for future sessions will be lost when you terminate Emacs. If you=E2=80=99d like to be prompted about unsaved customizations at termination time, add the following to your initialization file: (add-hook 'kill-emacs-query-functions 'custom-prompt-customize-unsaved-options) (For =E2=80=98custom-prompt-customize-unsaved-options=E2=80=99 to have a/th= e sensible meaning as a member of =E2=80=98kill-emacs-query-functions=E2=80=99, it mus= t return nil when there are unsaved options and the user answered "yes".) The reason that the behavior of =E2=80=98custom-prompt-customize-unsaved-options=E2=80=99 changed from vers= ion 27.2 to 28 almost certainly is the following: =E2=80=98custom-prompt-customize-unsaved-options=E2=80=99 calls =E2=80=98cu= stomize-unsaved=E2=80=99 which ends with call to =E2=80=98custom-buffer-create=E2=80=99. The defini= tion of =E2=80=98custom-buffer-create=E2=80=99 changed from Emacs 27.2 to Emacs 28.= In Emacs 27.2 it probably always returned non-nil. In Emacs 28 it always returns nil. However, the (and ...) form in =E2=80=98custom-prompt-customize-unsaved-options=E2=80=99 depends on =E2=80=98customize-unsaved=E2=80=99 to always return non-nil in order to be= correct. =E2=80=98custom-prompt-customize-unsaved-options=E2=80=99 always had the bu= g reported here. It just did not manifest before =E2=80=98custom-buffer-create=E2=80= =99 was changed from Emacs 27.2 to Emacs 28. Best wishes, Sebastian