summaryrefslogtreecommitdiff
path: root/src/cmds.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-07-21 21:43:52 +0000
committerGerd Moellmann <gerd@gnu.org>1999-07-21 21:43:52 +0000
commit2e8b3aed0dcd7e31dff2e63b9f74e1662bde241e (patch)
treee0cf7f3bedc4dcc95631eb89a9bf61148511ae1a /src/cmds.c
parent479e881bb4c5e5fa6e2d2180919b67c37efd309d (diff)
downloademacs-2e8b3aed0dcd7e31dff2e63b9f74e1662bde241e.tar.gz
(Fbeginning_of_line) [PROMPT_IN_BUFFER]: Set point to
end of prompt if applied to a mini-buffer and BEG reached.
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmds.c b/src/cmds.c
index 2273aa03002..9c2f83dc054 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -163,7 +163,17 @@ If scan reaches end of buffer, stop there without error.")
else
CHECK_NUMBER (n, 0);
+#if !NO_PROMPT_IN_BUFFER
+ {
+ int pos = XFASTINT (Fline_beginning_position (n));
+ if (INTEGERP (current_buffer->minibuffer_prompt_length)
+ && pos < XFASTINT (current_buffer->minibuffer_prompt_length))
+ pos = XFASTINT (current_buffer->minibuffer_prompt_length);
+ SET_PT (pos);
+ }
+#else
SET_PT (XINT (Fline_beginning_position (n)));
+#endif
return Qnil;
}