[Top][All Lists]

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

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

From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/minibuffer.el,v
Date: Mon, 21 Apr 2008 21:16:15 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/21 21:16:13

Index: minibuffer.el
RCS file: /sources/emacs/emacs/lisp/minibuffer.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- minibuffer.el       21 Apr 2008 19:02:54 -0000      1.20
+++ minibuffer.el       21 Apr 2008 21:16:13 -0000      1.21
@@ -693,12 +693,16 @@
                                      (substring string beg)
                                      pred action))))
-(defun completion--file-name-table (string dir action)
+(defun completion--file-name-table (string pred action)
   "Internal subroutine for `read-file-name'.  Do not call this."
-  (setq dir (expand-file-name dir))
   (if (and (zerop (length string)) (eq 'lambda action))
       nil                               ; FIXME: why?
-    (let* ((str (condition-case nil
+    (let* ((dir (if (stringp pred)
+                    ;; It used to be that `pred' was abused to pass `dir'
+                    ;; as an argument.
+                    (prog1 (expand-file-name pred) (setq pred nil))
+                  default-directory))
+           (str (condition-case nil
                     (substitute-in-file-name string)
                   (error string)))
            (name (file-name-nondirectory str))

reply via email to

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