Mercurial > emacs
comparison src/syntax.c @ 25401:3f78f1fed4e0
(Fforward_word): If in a mini-buffer and moving
backwards, stop in front of the prompt to prevent accidentially
moving into the read-only prompt.
| author | Gerd Moellmann <gerd@gnu.org> |
|---|---|
| date | Wed, 25 Aug 1999 21:12:36 +0000 |
| parents | a80acb2a8273 |
| children | d678b229c05a |
comparison
equal
deleted
inserted
replaced
| 25400:c75839c09c84 | 25401:3f78f1fed4e0 |
|---|---|
| 1212 if (!(val = scan_words (PT, XINT (count)))) | 1212 if (!(val = scan_words (PT, XINT (count)))) |
| 1213 { | 1213 { |
| 1214 SET_PT (XINT (count) > 0 ? ZV : BEGV); | 1214 SET_PT (XINT (count) > 0 ? ZV : BEGV); |
| 1215 return Qnil; | 1215 return Qnil; |
| 1216 } | 1216 } |
| 1217 | |
| 1218 /* If in a mini-buffer and moving backwards, stop in front of the | |
| 1219 prompt if we are currently in front of it. This prevents | |
| 1220 accidentially moving into the read-only prompt. */ | |
| 1221 if (INTEGERP (current_buffer->minibuffer_prompt_length)) | |
| 1222 { | |
| 1223 int prompt_end = XFASTINT (current_buffer->minibuffer_prompt_length); | |
| 1224 if (PT > prompt_end && val < prompt_end) | |
| 1225 val = prompt_end; | |
| 1226 } | |
| 1227 | |
| 1217 SET_PT (val); | 1228 SET_PT (val); |
| 1218 return Qt; | 1229 return Qt; |
| 1219 } | 1230 } |
| 1220 | 1231 |
| 1221 Lisp_Object skip_chars (); | 1232 Lisp_Object skip_chars (); |
