@table @kbd
@item M-p
-@itemx @key{UP}
Move to the previous item in the minibuffer history, an earlier
argument (@code{previous-history-element}).
@item M-n
-@itemx @key{DOWN}
Move to the next item in the minibuffer history
(@code{next-history-element}).
+@item @key{UP}
+@itemx @key{DOWN}
+Like @kbd{M-p} and @kbd{M-n}, but move to the previous or next line of
+a multi-line item before going to the previous history item
+(@code{previous-line-or-history-element} and
+@code{next-line-or-history-element}) .
@item M-r @var{regexp} @key{RET}
Move to an earlier item in the minibuffer history that
matches @var{regexp} (@code{previous-matching-history-element}).
@kindex DOWN @r{(minibuffer history)}
@findex next-history-element
@findex previous-history-element
- While in the minibuffer, @kbd{M-p} or @key{UP}
-(@code{previous-history-element}) moves through the minibuffer history
-list, one item at a time. Each @kbd{M-p} fetches an earlier item from
-the history list into the minibuffer, replacing its existing contents.
-Typing @kbd{M-n} or @key{DOWN} (@code{next-history-element}) moves
-through the minibuffer history list in the opposite direction,
-fetching later entries into the minibuffer.
+ While in the minibuffer, @kbd{M-p} (@code{previous-history-element})
+moves through the minibuffer history list, one item at a time. Each
+@kbd{M-p} fetches an earlier item from the history list into the
+minibuffer, replacing its existing contents. Typing @kbd{M-n}
+(@code{next-history-element}) moves through the minibuffer history
+list in the opposite direction, fetching later entries into the
+minibuffer.
If you type @kbd{M-n} in the minibuffer when there are no later
entries in the minibuffer history (e.g., if you haven't previously
arguments: values that you are likely to enter. You can think of this
as moving through the ``future history''.
+@findex previous-line-or-history-element
+@findex next-line-or-history-element
+ The arrow keys @kbd{@key{UP}} and @kbd{@key{DOWN}} work like
+@kbd{M-p} and @kbd{M-n}, but if the current history item is longer
+than a single line, they allow you to move to the previous or next
+line of the current history item before going to the previous or next
+history item.
+
If you edit the text inserted by the @kbd{M-p} or @kbd{M-n}
minibuffer history commands, this does not change its entry in the
history list. However, the edited argument does go at the end of the
** Minibuffer
-*** You can use <up> and <down> keys to move point in the multi-line
-minibuffer just as in an ordinary buffer. Only when point moves over
++++
+*** You can use <UP> and <DOWN> arrow keys to move through history by lines.
+The new commands `next-line-or-history-element' and
+`previous-line-or-history-element', bound to <UP> and <DOWN> in the
+minibuffer, allow by-line movement through minibuffer history,
+similarly to an ordinary buffer. Only when point moves over
the bottom/top of the minibuffer it goes to the next/previous history
-element. The new commands bound to <up> and <down> in the minibuffer:
-`next-line-or-history-element' and `previous-line-or-history-element'.
+element. `M-p' and `M-n' still move directly to previous/next history
+item as before.
** Search and Replace