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.
This commit is contained in:
parent
eace68a325
commit
6d507d586a
1 changed files with 1 additions and 3 deletions
|
@ -35,7 +35,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
#include "composite.h"
|
||||
#include "buffer.h"
|
||||
#include "intervals.h"
|
||||
#include "syntax.h"
|
||||
#include "window.h"
|
||||
#include "puresize.h"
|
||||
#include "gnutls.h"
|
||||
|
@ -3579,8 +3578,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,
|
||||
|
|
Loading…
Reference in a new issue