# HG changeset patch # User Oleksandr Gavenko # Date 1232309576 -7200 # Node ID e8fec75adcd630d49a68992b8b9d080a4588bc7c # Parent 8b2e019ee1470626eed770a98c33aec87422af8a Set .bat file association if bat-mode provided. diff -r 8b2e019ee147 -r e8fec75adcd6 .emacs-my --- 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))) ;; ====================================================================== ;;