(defvar minibuffer-temporary-goal-position nil)
(defun next-history-element (n)
- "Insert the next element of the minibuffer history into the minibuffer."
+ "Puts next element of the minibuffer history in the minibuffer.
+With argument N, it uses the Nth following element."
(interactive "p")
(or (zerop n)
(let ((narg (- minibuffer-history-position n))
(goto-char (or minibuffer-temporary-goal-position (point-max))))))
(defun previous-history-element (n)
- "Inserts the previous element of the minibuffer history into the minibuffer."
+ "Puts previous element of the minibuffer history in the minibuffer.
+With argument N, it uses the Nth previous element."
(interactive "p")
(next-history-element (- n)))