|
From: | Davin Pearson |
Subject: | Trouble getting archives to load as archives |
Date: | Thu, 3 Jul 2008 15:59:09 -0700 (PDT) |
User-agent: | G2/1.0 |
The following code works for Emacs Version 20.7 and 21.3 to load archive files as archives: (setq auto-mode-alist (cons '("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode) auto-mode-alist)) I tried the following code but it only works on ZIP files: (add-hook 'find-file-hooks 'my-archive-hook) (defun my-archive-hook () (when (or (string-match "\\.zip$" (buffer-name)) (string-match "\\.tar$" (buffer-name)) (string-match "\\.gz$" (buffer-name))) (archive-mode 1) )) So my question is this: how do I get archive-mode to display archives correctly for TAR and GZ files?
[Prev in Thread] | Current Thread | [Next in Thread] |