From: Kim F. Storm Date: Tue, 11 Jul 2006 20:13:59 +0000 (+0000) Subject: (ido-copy-current-file-name): Use buffer-name if buffer-file-name is nil. X-Git-Tag: emacs-pretest-22.0.90~1534 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bac4dbd166a05e22635cd1cc18ecb0c694ab2ce2;p=emacs.git (ido-copy-current-file-name): Use buffer-name if buffer-file-name is nil. --- diff --git a/lisp/ido.el b/lisp/ido.el index a4c26b52c98..be1cba62f27 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -2895,7 +2895,8 @@ With \\[universal-argument], pop all element." "Insert file name of current buffer. If repeated, insert text from buffer instead." (interactive "P") - (let* ((bfname (buffer-file-name ido-entry-buffer)) + (let* ((bfname (or (buffer-file-name ido-entry-buffer) + (buffer-name ido-entry-buffer))) (name (and bfname (file-name-nondirectory bfname)))) (when name (setq ido-text-init