From e2a63dc0d83c18ec71d151a2476478f4b48f57ba Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 18 Sep 2024 09:18:29 -0700 Subject: [PATCH] yes-or-no-p now uses blankp rather than SYNTAX MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/fns.c: Do not include syntax.h; no longer needed. (Fyes_or_no_p): Use blankp rather than SYNTAX to check whether the prompt ends in nonspace. That way, the test doesn’t depend on the current buffer. (cherry picked from commit 6d507d586a7ae2ab2caf32e32f2ae6134a90b1bd) --- src/fns.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fns.c b/src/fns.c index be9faa3af06..e91797d7764 100644 --- a/src/fns.c +++ b/src/fns.c @@ -35,7 +35,6 @@ along with GNU Emacs. If not, see . */ #include "composite.h" #include "buffer.h" #include "intervals.h" -#include "syntax.h" #include "window.h" #include "puresize.h" #include "gnutls.h" @@ -3577,8 +3576,7 @@ by a mouse, or by some window-system gesture, or via a menu. */) ptrdiff_t promptlen = SCHARS (prompt); bool prompt_ends_in_nonspace = (0 < promptlen - && (SYNTAX (XFIXNAT (Faref (prompt, make_fixnum (promptlen - 1)))) - != Swhitespace)); + && !blankp (XFIXNAT (Faref (prompt, make_fixnum (promptlen - 1))))); AUTO_STRING (space_string, " "); prompt = CALLN (Fconcat, prompt, prompt_ends_in_nonspace ? space_string : empty_unibyte_string, -- 2.39.5