>>>> "sb" == SL Baur <steve(a)xemacs.org>
writes:
sb> Vin Shelton <acs(a)xemacs.org> writes in xemacs-beta(a)xemacs.org:
> In 21.0 and earlier, all that's necessary to get tar-mode
automatically
> enabled is:
> (autoload 'tar-mode "tar-mode")
sb> This is redundant. If you have tar-mode installed (it's in the
sb> os-utils package) this autoload is already done for you.
> If I start xemacs -vanilla and eval that statement, editing a
tarfile, eg.
> "db-2.6.4.tar", comes up correctly in tar-mode.
> Now in 21.2, that no longer works. If I edit
"db-2.6.4.tar" under
> 21.2, the buffer comes up in fundamental mode.
sb> Problem reproduced in my environment. I haven't built 21.2.7 yet, but
sb> 21.2.6 behaves as you describe and 21.0 comes up in tar mode.
Here's the fix:
(I will commit this soon. This is my first CVS commit to the packages
tree. Is there anything I can mess up?)
STEVE ALERT:
(Note that the current behavior is more correct, since auto-mode-alist
will only have an entry for tar-mode if tar-mode is actually an
installed package. For complete correctness, the following patch
should also be applied to the lisp/files.el in 21.0, but that is
untested. I leave it up to Steve.
--- files.el 1998/10/15 22:29:01 1.30
+++ files.el 1998/12/31 02:53:14
@@ -1190,7 +1190,6 @@
("\\.wrl\\'" . vrml-mode)
("\\.awk\\'" . awk-mode)
("\\.prolog\\'" . prolog-mode)
- ("\\.tar\\'" . tar-mode)
("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode)
;; Mailer puts message to be edited in /tmp/Re.... or Message
;; #### Unix-specific!
END OF STEVE ALERT
Here's the real patch:
1998-12-30 Martin Buchholz <martin(a)xemacs.org>
* tar-mode.el (tar-regexp): Add autoload cookie.
(auto-mode-alist): Add autoload cookie.
diff -u -r1.3 tar-mode.el
--- tar-mode.el 1998/04/18 14:29:50 1.3
+++ tar-mode.el 1998/12/31 02:42:34
@@ -1309,9 +1309,11 @@
;;; Patch it in.
+;;;###autoload
(defvar tar-regexp "\\.\\(tar\\|tgz\\|tar\\.gz\\)\\'"
"The regular expression used to identify tar file names.")
+;;;###autoload
(setq auto-mode-alist
(cons (cons tar-regexp 'tar-mode) auto-mode-alist))