]> git.eshelyaron.com Git - emacs.git/commitdiff
(auto-mode-alist): Strip trailing ".in" from the file
authorSam Steingold <sds@gnu.org>
Sat, 1 Jun 2002 18:04:35 +0000 (18:04 +0000)
committerSam Steingold <sds@gnu.org>
Sat, 1 Jun 2002 18:04:35 +0000 (18:04 +0000)
name when deciding the mode (for config.h.in, Makefile.in etc).

lisp/ChangeLog
lisp/files.el

index 104999227032302d08cb1cdae9502dd45747c12e..f4e0bf2553a3936fab448e3af94bfee624add0ef 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-01  Sam Steingold  <sds@gnu.org>
+
+       * files.el (auto-mode-alist): Strip trailing ".in" from the file
+       name when deciding the mode (for config.h.in, Makefile.in etc).
+
 2002-06-01  Thien-Thi Nguyen  <ttn@gnu.org>
 
        * progmodes/prolog.el (prolog-mode-syntax-table): Add flags to
index bac2f6bb5c90c0676f69ff1d166e1dbbd8217e82..f6f787cff4d7e1bcc8986e8a1a2094285e522f74 100644 (file)
@@ -303,7 +303,7 @@ REGEXP is a regular expression to match against the file name.
 If it matches, `replace-match' is used to replace the
 matching part with REPLACEMENT.
 If the optional element UNIQUIFY is non-nil, the auto-save file name is
-constructed by taking the directory part of the replaced file-name, 
+constructed by taking the directory part of the replaced file-name,
 concatenated with the buffer file name with all directory separators
 changed to `!' to prevent clashes.  This will not work
 correctly if your filesystem truncates the resulting name.
@@ -483,7 +483,7 @@ DIR defaults to current buffer's directory default."
   (unless dir
     (setq dir default-directory))
   (unless default-dirname
-    (setq default-dirname 
+    (setq default-dirname
          (if initial (concat dir initial) default-directory)))
   (read-file-name prompt dir default-dirname mustmatch initial
                  'file-directory-p))
@@ -1179,7 +1179,7 @@ that are visiting the various files."
                  (unless (or (eq read-only buffer-file-read-only)
                              (eq read-only buffer-read-only))
                    (when (or nowarn
-                             (let ((question 
+                             (let ((question
                                     (format "File %s is %s on disk.  Change buffer mode? "
                                             buffer-file-name
                                             (if read-only "read-only" "writable"))))
@@ -1461,7 +1461,8 @@ in that case, this function acts as if `enable-local-variables' were t."
   (mapc
    (lambda (elt)
      (cons (purecopy (car elt)) (cdr elt)))
-   '(("\\.te?xt\\'" . text-mode)
+   '(("\\.in\\'" nil t)
+     ("\\.te?xt\\'" . text-mode)
      ("\\.c\\'" . c-mode)
      ("\\.h\\'" . c-mode)
      ("\\.tex\\'" . tex-mode)
@@ -1492,7 +1493,7 @@ in that case, this function acts as if `enable-local-variables' were t."
      ("\\.m\\'" . objc-mode)
      ("\\.java\\'" . java-mode)
      ("\\.mk\\'" . makefile-mode)
-     ("\\(M\\|m\\|GNUm\\)akefile\\(\\.in\\)?\\'" . makefile-mode)
+     ("\\(M\\|m\\|GNUm\\)akefile\\'" . makefile-mode)
      ("\\.am\\'" . makefile-mode)      ;For Automake.
      ;; Less common extensions come here
      ;; so more common ones above are found faster.