aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2002-06-01 18:04:35 +0000
committerSam Steingold2002-06-01 18:04:35 +0000
commit36236b72327a86ced924d708fd78204b54c625d2 (patch)
tree83f0e2059109cccb8122eee17a1253758247af45
parent2629d7432a484bcb6daa991c5e5be1c19d3ea8a4 (diff)
downloademacs-36236b72327a86ced924d708fd78204b54c625d2.tar.gz
emacs-36236b72327a86ced924d708fd78204b54c625d2.zip
(auto-mode-alist): Strip trailing ".in" from the file
name when deciding the mode (for config.h.in, Makefile.in etc).
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el11
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 10499922703..f4e0bf2553a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12002-06-01 Sam Steingold <sds@gnu.org>
2
3 * files.el (auto-mode-alist): Strip trailing ".in" from the file
4 name when deciding the mode (for config.h.in, Makefile.in etc).
5
12002-06-01 Thien-Thi Nguyen <ttn@gnu.org> 62002-06-01 Thien-Thi Nguyen <ttn@gnu.org>
2 7
3 * progmodes/prolog.el (prolog-mode-syntax-table): Add flags to 8 * progmodes/prolog.el (prolog-mode-syntax-table): Add flags to
diff --git a/lisp/files.el b/lisp/files.el
index bac2f6bb5c9..f6f787cff4d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -303,7 +303,7 @@ REGEXP is a regular expression to match against the file name.
303If it matches, `replace-match' is used to replace the 303If it matches, `replace-match' is used to replace the
304matching part with REPLACEMENT. 304matching part with REPLACEMENT.
305If the optional element UNIQUIFY is non-nil, the auto-save file name is 305If the optional element UNIQUIFY is non-nil, the auto-save file name is
306constructed by taking the directory part of the replaced file-name, 306constructed by taking the directory part of the replaced file-name,
307concatenated with the buffer file name with all directory separators 307concatenated with the buffer file name with all directory separators
308changed to `!' to prevent clashes. This will not work 308changed to `!' to prevent clashes. This will not work
309correctly if your filesystem truncates the resulting name. 309correctly if your filesystem truncates the resulting name.
@@ -483,7 +483,7 @@ DIR defaults to current buffer's directory default."
483 (unless dir 483 (unless dir
484 (setq dir default-directory)) 484 (setq dir default-directory))
485 (unless default-dirname 485 (unless default-dirname
486 (setq default-dirname 486 (setq default-dirname
487 (if initial (concat dir initial) default-directory))) 487 (if initial (concat dir initial) default-directory)))
488 (read-file-name prompt dir default-dirname mustmatch initial 488 (read-file-name prompt dir default-dirname mustmatch initial
489 'file-directory-p)) 489 'file-directory-p))
@@ -1179,7 +1179,7 @@ that are visiting the various files."
1179 (unless (or (eq read-only buffer-file-read-only) 1179 (unless (or (eq read-only buffer-file-read-only)
1180 (eq read-only buffer-read-only)) 1180 (eq read-only buffer-read-only))
1181 (when (or nowarn 1181 (when (or nowarn
1182 (let ((question 1182 (let ((question
1183 (format "File %s is %s on disk. Change buffer mode? " 1183 (format "File %s is %s on disk. Change buffer mode? "
1184 buffer-file-name 1184 buffer-file-name
1185 (if read-only "read-only" "writable")))) 1185 (if read-only "read-only" "writable"))))
@@ -1461,7 +1461,8 @@ in that case, this function acts as if `enable-local-variables' were t."
1461 (mapc 1461 (mapc
1462 (lambda (elt) 1462 (lambda (elt)
1463 (cons (purecopy (car elt)) (cdr elt))) 1463 (cons (purecopy (car elt)) (cdr elt)))
1464 '(("\\.te?xt\\'" . text-mode) 1464 '(("\\.in\\'" nil t)
1465 ("\\.te?xt\\'" . text-mode)
1465 ("\\.c\\'" . c-mode) 1466 ("\\.c\\'" . c-mode)
1466 ("\\.h\\'" . c-mode) 1467 ("\\.h\\'" . c-mode)
1467 ("\\.tex\\'" . tex-mode) 1468 ("\\.tex\\'" . tex-mode)
@@ -1492,7 +1493,7 @@ in that case, this function acts as if `enable-local-variables' were t."
1492 ("\\.m\\'" . objc-mode) 1493 ("\\.m\\'" . objc-mode)
1493 ("\\.java\\'" . java-mode) 1494 ("\\.java\\'" . java-mode)
1494 ("\\.mk\\'" . makefile-mode) 1495 ("\\.mk\\'" . makefile-mode)
1495 ("\\(M\\|m\\|GNUm\\)akefile\\(\\.in\\)?\\'" . makefile-mode) 1496 ("\\(M\\|m\\|GNUm\\)akefile\\'" . makefile-mode)
1496 ("\\.am\\'" . makefile-mode) ;For Automake. 1497 ("\\.am\\'" . makefile-mode) ;For Automake.
1497 ;; Less common extensions come here 1498 ;; Less common extensions come here
1498 ;; so more common ones above are found faster. 1499 ;; so more common ones above are found faster.