Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e2dae3f2
Commit
e2dae3f2
authored
Sep 12, 1999
by
Richard M. Stallman
Browse files
(Fline_beginning_position): Handle minibuffer prompt here.
parent
8e713be6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/editfns.c
src/editfns.c
+10
-1
No files found.
src/editfns.c
View file @
e2dae3f2
...
...
@@ -282,7 +282,10 @@ DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_posi
"Return the character position of the first character on the current line.\n\
With argument N not nil or 1, move forward N - 1 lines first.\n\
If scan reaches end of buffer, return that position.\n\
This function does not move point.")
This function does not move point.\n\n\
In the minibuffer, if point is not within the prompt,\n\
the return value is never within the prompt either.")
(n)
Lisp_Object n;
{
...
...
@@ -297,6 +300,12 @@ This function does not move point.")
orig_byte = PT_BYTE;
Fforward_line (make_number (XINT (n) - 1));
end = PT;
if (INTEGERP (current_buffer->minibuffer_prompt_length)
&& orig >= XFASTINT (current_buffer->minibuffer_prompt_length)
&& end < XFASTINT (current_buffer->minibuffer_prompt_length))
end = XFASTINT (current_buffer->minibuffer_prompt_length);
SET_PT_BOTH (orig, orig_byte);
return make_number (end);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment