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
18fef111
Commit
18fef111
authored
Aug 07, 1996
by
Richard M. Stallman
Browse files
(Fread_from_minibuffer): Make position 0 in the initial
input mean the beginning.
parent
dea5efcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/minibuf.c
src/minibuf.c
+6
-2
No files found.
src/minibuf.c
View file @
18fef111
...
...
@@ -493,7 +493,7 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1,
If optional second arg INITIAL-CONTENTS is non-nil, it is a string\n\
to be inserted into the minibuffer before reading input.\n\
If INITIAL-CONTENTS is (STRING . POSITION), the initial input\n\
is STRING, but point is placed
POSITION characters into the string
.\n\
is STRING, but point is placed
at position POSITION in the minibuffer
.\n\
Third arg KEYMAP is a keymap to use whilst reading;\n\
if omitted or nil, the default is `minibuffer-local-map'.\n\
If fourth arg READ is non-nil, then interpret the result as a lisp object\n\
...
...
@@ -531,7 +531,11 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1,
{
CHECK_NUMBER
(
position
,
0
);
/* Convert to distance from end of input. */
pos
=
XINT
(
position
)
-
1
-
XSTRING
(
initial_contents
)
->
size
;
if
(
XINT
(
position
)
<
1
)
/* A number too small means the beginning of the string. */
pos
=
-
XSTRING
(
initial_contents
)
->
size
;
else
pos
=
XINT
(
position
)
-
1
-
XSTRING
(
initial_contents
)
->
size
;
}
}
...
...
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