From: Richard M. Stallman Date: Mon, 6 Sep 1999 22:03:38 +0000 (+0000) Subject: (tar-extract): Don't assume buffer is visiting a file. X-Git-Tag: emacs-pretest-21.0.90~6867 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=84f72c5bbdf8b1241da9354cafc8e839e53192ea;p=emacs.git (tar-extract): Don't assume buffer is visiting a file. --- diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index e45b36bb064..7e95ef3eb4d 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -753,7 +753,9 @@ appear on disk when you save the tar-file's buffer." (end (+ start size))) (let* ((tar-buffer (current-buffer)) (tar-buffer-multibyte enable-multibyte-characters) - (tarname (file-name-nondirectory (buffer-file-name))) + (tarname (if (buffer-file-name) + (file-name-nondirectory (buffer-file-name)) + (buffer-name))) (bufname (concat (file-name-nondirectory name) " (" tarname