aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-08-25 21:12:36 +0000
committerGerd Moellmann1999-08-25 21:12:36 +0000
commit5878ee6fc41906578910f760f098452b1880b792 (patch)
treecf8319f4b899e528c71ac3457a311c742e3159f0 /src/syntax.c
parent89ee2bf6202076a005a699e4de57afcd55f26c04 (diff)
downloademacs-5878ee6fc41906578910f760f098452b1880b792.tar.gz
emacs-5878ee6fc41906578910f760f098452b1880b792.zip
(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.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 233f7980251..71a2080836d 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1214,6 +1214,17 @@ and nil is returned.")
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}