unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Trouble getting archives to load as archives
@ 2008-07-03 22:59 Davin Pearson
  2008-07-04  5:38 ` Thierry Volpiatto
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Davin Pearson @ 2008-07-03 22:59 UTC (permalink / raw)
  To: help-gnu-emacs

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?


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-07-08 11:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03 22:59 Trouble getting archives to load as archives Davin Pearson
2008-07-04  5:38 ` Thierry Volpiatto
2008-07-05  1:37   ` Davin Pearson
2008-07-06 10:59     ` Thierry Volpiatto
2008-07-04 21:57 ` Peter Dyballa
     [not found] ` <mailman.14225.1215208751.18990.help-gnu-emacs@gnu.org>
2008-07-05  1:32   ` Davin Pearson
2008-07-05  2:23     ` Bernardo Bacic
2008-07-05  2:57       ` Davin Pearson
2008-07-05  8:19         ` Peter Dyballa
2008-07-06  8:21           ` Davin Pearson
2008-07-08  7:00             ` Kevin Rodgers
2008-07-08  7:23               ` Peter Dyballa
2008-07-08 10:52               ` Bernardo Bacic
2008-07-08 11:24                 ` Peter Dyballa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).