# HG changeset patch # User Stefan Monnier # Date 1255489506 0 # Node ID e84a6a47bcb9cc0cedea78748f63576fdaa31197 # Parent 2586fdd484bd7b711f008a92a8b85c94de3e20d4 (completion--file-name-table): Return nil if there's no file completion, even if substitute-in-file-name changed the string (bug#4708). diff -r 2586fdd484bd -r e84a6a47bcb9 lisp/ChangeLog --- a/lisp/ChangeLog Tue Oct 13 22:35:44 2009 +0000 +++ b/lisp/ChangeLog Wed Oct 14 03:05:06 2009 +0000 @@ -1,3 +1,9 @@ +2009-10-14 Stefan Monnier + + * minibuffer.el (completion--file-name-table): Return nil if there's + no file completion, even if substitute-in-file-name changed + the string (bug#4708). + 2009-10-13 Juri Linkov * files-x.el (read-file-local-variable-value): Don't filter out @@ -277,7 +283,7 @@ 2009-10-05 Stefan Monnier - * help-fns.el (describe-function-1): Don't burp is the function is not + * help-fns.el (describe-function-1): Don't burp if the function is not a symbol. 2009-10-05 Juanma Barranquero diff -r 2586fdd484bd -r e84a6a47bcb9 lisp/minibuffer.el --- a/lisp/minibuffer.el Tue Oct 13 22:35:44 2009 +0000 +++ b/lisp/minibuffer.el Wed Oct 14 03:05:06 2009 +0000 @@ -1078,16 +1078,18 @@ ((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)))