emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/simple.el,v


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el,v
Date: Mon, 22 Oct 2007 00:17:27 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     07/10/22 00:17:27

Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.882
retrieving revision 1.883
diff -u -b -r1.882 -r1.883
--- simple.el   18 Oct 2007 04:52:06 -0000      1.882
+++ simple.el   22 Oct 2007 00:17:26 -0000      1.883
@@ -1295,7 +1295,11 @@
   "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))
@@ -1317,8 +1321,10 @@
     (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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]