diff options
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/syntax.c b/src/syntax.c index 82fabc254e7..5b5eb341678 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -1227,7 +1227,7 @@ and nil is returned.") | |||
| 1227 | (count) | 1227 | (count) |
| 1228 | Lisp_Object count; | 1228 | Lisp_Object count; |
| 1229 | { | 1229 | { |
| 1230 | int val; | 1230 | int val, prompt_end; |
| 1231 | CHECK_NUMBER (count, 0); | 1231 | CHECK_NUMBER (count, 0); |
| 1232 | 1232 | ||
| 1233 | if (!(val = scan_words (PT, XINT (count)))) | 1233 | if (!(val = scan_words (PT, XINT (count)))) |
| @@ -1236,16 +1236,15 @@ and nil is returned.") | |||
| 1236 | return Qnil; | 1236 | return Qnil; |
| 1237 | } | 1237 | } |
| 1238 | 1238 | ||
| 1239 | /* If in a mini-buffer and moving backwards, stop in front of the | 1239 | /* If in a mini-buffer and moving backwards, stop at the end of the |
| 1240 | prompt if we are currently in front of it. This prevents | 1240 | prompt. This prevents accidentially moving into the read-only |
| 1241 | accidentially moving into the read-only prompt. */ | 1241 | prompt. */ |
| 1242 | if (INTEGERP (current_buffer->minibuffer_prompt_length)) | 1242 | if (INTEGERP (current_buffer->minibuffer_prompt_length) |
| 1243 | { | 1243 | && (prompt_end = XINT (current_buffer->minibuffer_prompt_length), |
| 1244 | int prompt_end = XFASTINT (current_buffer->minibuffer_prompt_length); | 1244 | ((PT > prompt_end && val < prompt_end) |
| 1245 | if (PT > prompt_end && val < prompt_end) | 1245 | || (PT < prompt_end && val > prompt_end)))) |
| 1246 | val = prompt_end; | 1246 | val = prompt_end; |
| 1247 | } | 1247 | |
| 1248 | |||
| 1249 | SET_PT (val); | 1248 | SET_PT (val); |
| 1250 | return Qt; | 1249 | return Qt; |
| 1251 | } | 1250 | } |