+2007-10-22 Juri Linkov <juri@jurta.org>
+
+ * simple.el (goto-history-element): Allow minibuffer-default to be
+ a list of default values accessible by typing M-n in the minibuffer.
+
2007-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/byte-opt.el (byte-optimize-featurep): Fix paren typo.
"Puts element of the minibuffer history in the minibuffer.
The argument NABS specifies the absolute history position."
(interactive "p")
- (let ((minimum (if minibuffer-default -1 0))
+ (let ((minimum (if minibuffer-default
+ (- (if (listp minibuffer-default)
+ (length minibuffer-default)
+ 1))
+ 0))
elt minibuffer-returned-to-present)
(if (and (zerop minibuffer-history-position)
(null minibuffer-text-before-history))
(goto-char (point-max))
(delete-minibuffer-contents)
(setq minibuffer-history-position nabs)
- (cond ((= nabs -1)
- (setq elt minibuffer-default))
+ (cond ((< nabs 0)
+ (setq elt (if (listp minibuffer-default)
+ (nth (1- (abs nabs)) minibuffer-default)
+ minibuffer-default)))
((= nabs 0)
(setq elt (or minibuffer-text-before-history ""))
(setq minibuffer-returned-to-present t)