# HG changeset patch # User Gerd Moellmann # Date 936304555 0 # Node ID 863b49f711d6d458b8b80b7619844beaf3c89e6b # Parent 0359edc6e42838a1bd31c348ead441ab9b949e18 (Fforward_word): Stop at a mini-buffer prompt end in both directions. Extend documentation. diff -r 0359edc6e428 -r 863b49f711d6 src/syntax.c --- a/src/syntax.c Thu Sep 02 20:35:53 1999 +0000 +++ b/src/syntax.c Thu Sep 02 20:35:55 1999 +0000 @@ -1227,7 +1227,7 @@ (count) Lisp_Object count; { - int val; + int val, prompt_end; CHECK_NUMBER (count, 0); if (!(val = scan_words (PT, XINT (count)))) @@ -1236,16 +1236,15 @@ return Qnil; } - /* If in a mini-buffer and moving backwards, stop in front of the - prompt if we are currently in front of it. This prevents - accidentially moving into the read-only prompt. */ - if (INTEGERP (current_buffer->minibuffer_prompt_length)) - { - int prompt_end = XFASTINT (current_buffer->minibuffer_prompt_length); - if (PT > prompt_end && val < prompt_end) - val = prompt_end; - } - + /* If in a mini-buffer and moving backwards, stop at the end of the + prompt. This prevents accidentially moving into the read-only + prompt. */ + if (INTEGERP (current_buffer->minibuffer_prompt_length) + && (prompt_end = XINT (current_buffer->minibuffer_prompt_length), + ((PT > prompt_end && val < prompt_end) + || (PT < prompt_end && val > prompt_end)))) + val = prompt_end; + SET_PT (val); return Qt; }