Set .bat file association if bat-mode provided.
--- a/.emacs-my Sun Jan 18 21:56:23 2009 +0200
+++ b/.emacs-my Sun Jan 18 22:12:56 2009 +0200
@@ -575,20 +575,12 @@
;; (setq sh-shell-arg (quote ((bash) (csh . "-f") (pdksh) (ksh88) (rc . "-p") (wksh) (zsh . "-f") (sh . "-i"))))
(setq explicit-bash-args (quote ("-login" "-i")))
-
-(if (equal window-system 'w32)
- (progn
- (setq auto-mode-alist
- (append
- (list (cons "\\.[bB][aA][tT]$" 'bat-mode))
- ;; For DOS init files
- (list (cons "CONFIG\\." 'bat-mode))
- (list (cons "AUTOEXEC\\." 'bat-mode))
- auto-mode-alist))
- ;; XXX Wrong!
- (require 'bat-mode)
- )
- )
+(when (provide 'bat-mode)
+ (progn
+ (add-to-list 'auto-mode-alist '("\\.[bB][aA][tT]$" . bat-mode))
+ ;; For DOS init files
+ (add-to-list 'auto-mode-alist '("CONFIG\\." . bat-mode))
+ (add-to-list 'auto-mode-alist '("AUTOEXEC\\." . bat-mode)))
;; ======================================================================
;;