diff lisp/files.el @ 62567:ec0b3f67cb69

(auto-mode-alist): Check GNUmakefile before makefile. Default to makefile-bsdmake-mode on BSD systems.
author Daniel Pfeiffer <occitan@esperanto.org>
date Sat, 21 May 2005 02:42:00 +0000
parents a7e02ef1e3d6
children 1cee97f4847c 63b7247f4be6 5b029ff3b08d
line wrap: on
line diff
--- a/lisp/files.el	Fri May 20 22:39:33 2005 +0000
+++ b/lisp/files.el	Sat May 21 02:42:00 2005 +0000
@@ -1744,7 +1744,7 @@
   (mapc
    (lambda (elt)
      (cons (purecopy (car elt)) (cdr elt)))
-   '(;; do this first, so that .html.pl is Polish html, not Perl
+   `(;; do this first, so that .html.pl is Polish html, not Perl
      ("\\.s?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode)
      ("\\.te?xt\\'" . text-mode)
      ("\\.[tT]e[xX]\\'" . tex-mode)
@@ -1762,9 +1762,12 @@
      ("\\.ad[abs]\\'" . ada-mode)
      ("\\.ad[bs].dg\\'" . ada-mode)
      ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
-     ("\\.mk\\'" . makefile-gmake-mode)	; Might be any make, give Gnu the host advantage
-     ("[Mm]akefile\\'" . makefile-mode)
      ("GNUmakefile\\'" . makefile-gmake-mode)
+     ,@(if (memq system-type '(berkeley-unix next-mach darwin))
+	   '(("\\.mk\\'" . makefile-bsdmake-mode)
+	     ("[Mm]akefile\\'" . makefile-bsdmake-mode))
+	 '(("\\.mk\\'" . makefile-gmake-mode)	; Might be any make, give Gnu the host advantage
+	   ("[Mm]akefile\\'" . makefile-mode)))
      ("Makeppfile\\'" . makefile-makepp-mode)
      ("\\.am\\'" . makefile-automake-mode)
      ;; Less common extensions come here