diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-14 03:05:06 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-14 03:05:06 +0000 |
commit | 40ba988259b642d0fb3dd692f4a3c894309d2951 (patch) | |
tree | 6ab2f8de48e7beaecc4fee7248582c1bcccf2bee /lisp/minibuffer.el | |
parent | 04e0f59b54648b0319b3a6c00502a3cb3c21f841 (diff) | |
download | emacs-40ba988259b642d0fb3dd692f4a3c894309d2951.tar.gz |
(completion--file-name-table): Return nil if there's
no file completion, even if substitute-in-file-name changed
the string (bug#4708).
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r-- | lisp/minibuffer.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 8f2de068444..48a3ac01138 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1078,16 +1078,18 @@ variables.") ((null action) (let ((comp (file-name-completion name realdir read-file-name-predicate))) - (if (stringp comp) - ;; Requote the $s before returning the completion. - (minibuffer--double-dollars (concat specdir comp)) + (cond + ((stringp comp) + ;; Requote the $s before returning the completion. + (minibuffer--double-dollars (concat specdir comp))) + (comp ;; Requote the $s before checking for changes. (setq str (minibuffer--double-dollars str)) (if (string-equal string str) comp ;; If there's no real completion, but substitute-in-file-name ;; changed the string, then return the new string. - str)))) + str))))) ((eq action t) (let ((all (file-name-all-completions name realdir))) |