From: Paul Eggert Date: Wed, 18 Sep 2024 16:18:29 +0000 (-0700) Subject: yes-or-no-p now uses blankp rather than SYNTAX X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e2a63dc0d83c18ec71d151a2476478f4b48f57ba;p=emacs.git yes-or-no-p now uses blankp rather than SYNTAX * 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) --- 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,