[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Define tar-superior-buffer before normal-mode call

From: Vitalie Spinu
Subject: [PATCH] Define tar-superior-buffer before normal-mode call
Date: Sat, 04 Apr 2015 12:29:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.90 (gnu/linux)

Tar-superior-buffer and tar-superior-descriptor are installed into
extracted buffer only after the (normal-mode) call. That makes it
difficult for the mode to detect that it's running on a file from

For instance image-mode currently pointlessly checks for
tar-superior-buffer as it's unset at the moment image-mode is called.


Changes from HEAD to working tree
1 file changed, 1 insertion(+), 1 deletion(-)
 lisp/tar-mode.el | 2 +-

        Modified   lisp/tar-mode.el
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 6c7f755..6f7bad1 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -947,9 +947,9 @@ tar-file's buffer."
               (with-current-buffer tar-buffer
         (set-buffer-modified-p nil)
-        (normal-mode)                   ; pick a mode.
         (set (make-local-variable 'tar-superior-buffer) tar-buffer)
         (set (make-local-variable 'tar-superior-descriptor) descriptor)
+        (normal-mode)                   ; pick a mode.
         (setq buffer-read-only read-only-p)
         (tar-subfile-mode 1)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]