From: Stefan Monnier Date: Wed, 14 Oct 2009 03:05:06 +0000 (+0000) Subject: (completion--file-name-table): Return nil if there's X-Git-Tag: emacs-pretest-23.1.90~814 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40ba988259b642d0fb3dd692f4a3c894309d2951;p=emacs.git (completion--file-name-table): Return nil if there's no file completion, even if substitute-in-file-name changed the string (bug#4708). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ddb0a35a0f..83dd29242c0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --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)))