changeset 7078:cf120e7b7d2c

(tar-extract): Don't put whole file name in buffer name. Do put it in list-buffers-directory. Save mode line space when mentioning the tar file name. (tar-subfile-mode): Don't add anything to minor-mode-alist.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Apr 1994 08:32:32 +0000
parents 4c0af7fbb42e
children 5b975a51928f
files lisp/tar-mode.el
diffstat 1 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tar-mode.el	Sun Apr 24 08:17:30 1994 +0000
+++ b/lisp/tar-mode.el	Sun Apr 24 08:32:32 1994 +0000
@@ -562,10 +562,10 @@
   (interactive "P")
   (or (and (boundp 'tar-superior-buffer) tar-superior-buffer)
       (error "This buffer is not an element of a tar file"))
-  (or (assq 'tar-subfile-mode minor-mode-alist)
-      (setq minor-mode-alist (append minor-mode-alist
-				     (list '(tar-subfile-mode
-					     " TarFile")))))
+;;; Don't do this, because it is redundant and wastes mode line space.
+;;;  (or (assq 'tar-subfile-mode minor-mode-alist)
+;;;      (setq minor-mode-alist (append minor-mode-alist
+;;;				     (list '(tar-subfile-mode " TarFile")))))
   (make-local-variable 'tar-subfile-mode)
   (setq tar-subfile-mode
 	(if (null p)
@@ -650,9 +650,10 @@
 	 (start (+ (tar-desc-data-start descriptor) tar-header-offset -1))
 	 (end (+ start size)))
     (let* ((tar-buffer (current-buffer))
+	   (tarname (file-name-nondirectory (buffer-file-name)))
 	   (bufname (concat (file-name-nondirectory name)
-			    " (" name " in "
-			    (file-name-nondirectory (buffer-file-name))
+			    " ("
+			    tarname
 			    ")"))
 	   (read-only-p (or buffer-read-only view-p))
 	   (buffer (get-buffer bufname))
@@ -677,6 +678,12 @@
 		(make-local-variable 'tar-superior-descriptor)
 		(setq tar-superior-buffer tar-buffer)
 		(setq tar-superior-descriptor descriptor)
+
+		;; Since the "real" file name is not in buffer-file-name,
+		;; put it here for list-buffers.
+		(make-local-variable 'list-buffers-directory)
+		(setq list-buffers-directory name)
+
 		(tar-subfile-mode 1)
 		
 		(setq buffer-read-only read-only-p)