From 84f72c5bbdf8b1241da9354cafc8e839e53192ea Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 6 Sep 1999 22:03:38 +0000 Subject: [PATCH] (tar-extract): Don't assume buffer is visiting a file. --- lisp/tar-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5