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#71406: 30.0.50; string-edit signals error when user aborts and :abort-callback parameter nil Date: Sat, 08 Jun 2024 16:09:33 +0300 Message-ID: <86cyord1iq.fsf@gnu.org> References: <87bk4eawix.fsf@parenthetic.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2988"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71406@debbugs.gnu.org To: Nicholas Vollmer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 08 15:11:08 2024 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 1sFvqd-0000YP-Vn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jun 2024 15:11:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFvqJ-0008SL-Qd; Sat, 08 Jun 2024 09:10:47 -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 1sFvqI-0008Ry-F5 for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 09:10:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFvqI-0003ra-6Y for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 09:10:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFvqX-0004gO-VM for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 09:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jun 2024 13:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71406 X-GNU-PR-Package: emacs Original-Received: via spool by 71406-submit@debbugs.gnu.org id=B71406.171785220617917 (code B ref 71406); Sat, 08 Jun 2024 13:11:01 +0000 Original-Received: (at 71406) by debbugs.gnu.org; 8 Jun 2024 13:10:06 +0000 Original-Received: from localhost ([127.0.0.1]:37859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFvpe-0004ev-5e for submit@debbugs.gnu.org; Sat, 08 Jun 2024 09:10:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFvpc-0004eL-HK for 71406@debbugs.gnu.org; Sat, 08 Jun 2024 09:10:05 -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 1sFvpH-0003XM-Di; Sat, 08 Jun 2024 09:09:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CmqxXUohrRDS2FD/N4lqiV9LhNioXVPy8gLx4V5eb3k=; b=eQS1cOBKyvvQ PlQpLiEiZXq1X27Czz2Y4TXShNQ/F4qaa40e1bg5A3vPXNWueuQGksY8IylohjvsQbtWcQX+zS4p4 swze9ZZKMaBhK0CaVtte9uVhoKDJS6OXPCJmgn94eGEsWlXuVmWyeVYfrVxz/jMdchlvSS5OH/NU+ ShGaSN8jFJMlTiyLgDsZtl86QdENCLmQwKoqLSzHHIfJHc6jmMO4EV/OquUPYwe9wRI4rygbLRVNZ wdoH+0wawSazEofIwUYzZVzC+ENCcRqYK6N+qbWhCaIuo5IUrp+iAvyh/eohJNQBFIpg8BSNkaw35 +0c/zuM2tJE2EkhbubEfEg==; In-Reply-To: <87bk4eawix.fsf@parenthetic.dev> (message from Nicholas Vollmer on Thu, 06 Jun 2024 12:03:34 -0400) 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:286849 Archived-At: > From: Nicholas Vollmer > Date: Thu, 06 Jun 2024 12:03:34 -0400 > > > 1. emacs -q > 2. eval (string-edit "test" "" #'ignore) > 3. In the "*edit string*" buffer eval string-edit-abort. > > The following error is signaled: > > Debugger entered--Lisp error: (void-variable > string-edit--abort-callback) > string-edit-abort() > funcall-interactively(string-edit-abort) > command-execute(string-edit-abort) > > Seeing as string-edit specifies this parameter as a &key, it > should either provide a default (#'ignore?) or error if the caller > does not provide an abort function (Though why specify it as a > keyword arg if it's mandatory?). Thanks, I fixed this with the patch below. diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el index 03be426..cafed5a 100644 --- a/lisp/textmodes/string-edit.el +++ b/lisp/textmodes/string-edit.el @@ -75,8 +75,7 @@ string-edit (setq buffer-undo-list nil) (string-edit-mode) (setq-local string-edit--success-callback success-callback) - (when abort-callback - (setq-local string-edit--abort-callback abort-callback)) + (setq-local string-edit--abort-callback abort-callback) (setq-local header-line-format (substitute-command-keys "Type \\\\[string-edit-done] when you've finished editing or \\[string-edit-abort] to abort"))