diff lisp/prim/minibuf.el @ 100:4be1180a9e89 r20-1b2

Import from CVS: tag r20-1b2
author cvs
date Mon, 13 Aug 2007 09:15:11 +0200
parents dbb370e3c29e
children cca96a509cfe
line wrap: on
line diff
--- a/lisp/prim/minibuf.el	Mon Aug 13 09:13:58 2007 +0200
+++ b/lisp/prim/minibuf.el	Mon Aug 13 09:15:11 2007 +0200
@@ -403,6 +403,7 @@
                                   (if minibuffer-exit-hook
                                       (run-hooks 'minibuffer-exit-hook))
                                   (buffer-string)))
+                    (histval val)
                       (err nil))
                  (if readp
                      (condition-case e
@@ -424,12 +425,12 @@
 		     (let ((list (symbol-value minibuffer-history-variable)))
 		       (or (eq list t)
 			   (null val)
-			   (and list (equal val (car list)))
+			   (and list (equal histval (car list)))
 			   (and (stringp val)
 				minibuffer-history-minimum-string-length
 				(< (length val)
 				   minibuffer-history-minimum-string-length))
-			   (set minibuffer-history-variable (cons val list)))))
+			   (set minibuffer-history-variable (cons histval list)))))
                  (if err (signal (car err) (cdr err)))
                  val))))
       ;; stupid display code requires this for some reason
@@ -1704,9 +1705,7 @@
                ;; complete?
                (if (not orig)
                    nil
-		 (and (file-directory-p string)
-		      ;; So "foo" is ambiguous between "foo/" and "foobar/"
-		      (equal string (file-name-as-directory string)))))
+		 (file-directory-p string)))
               ((eq action 't)
                ;; all completions
                (funcall dirs #'(lambda (n)