Mercurial > emacs
changeset 37692:3900bbc84b5c
(auto-mode-alist): Add *.perl and fix the *.<rev> case.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 11 May 2001 20:22:46 +0000 |
parents | 89381572c3f1 |
children | 15212455191b |
files | lisp/files.el |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Fri May 11 19:45:28 2001 +0000 +++ b/lisp/files.el Fri May 11 20:22:46 2001 +0000 @@ -68,7 +68,7 @@ :group 'abbrev :group 'find-file) -;;; Turn off backup files on VMS since it has version numbers. +;; Turn off backup files on VMS since it has version numbers. (defcustom make-backup-files (not (eq system-type 'vax-vms)) "*Non-nil means make a backup of a file the first time it is saved. This can be done by renaming the file or by copying. @@ -1347,7 +1347,7 @@ ("\\.p\\'" . pascal-mode) ("\\.pas\\'" . pascal-mode) ("\\.ad[abs]\\'" . ada-mode) - ("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode) + ("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" . perl-mode) ("\\.s?html?\\'" . html-mode) ("\\.cc\\'" . c++-mode) ("\\.hh\\'" . c++-mode) @@ -1364,8 +1364,8 @@ ("\\.mk\\'" . makefile-mode) ("\\(M\\|m\\|GNUm\\)akefile\\(\\.in\\)?\\'" . makefile-mode) ("\\.am\\'" . makefile-mode) ;For Automake. -;;; Less common extensions come here -;;; so more common ones above are found faster. + ;; Less common extensions come here + ;; so more common ones above are found faster. ("\\.texinfo\\'" . texinfo-mode) ("\\.te?xi\\'" . texinfo-mode) ("\\.s\\'" . asm-mode) @@ -1455,11 +1455,13 @@ ("#\\*mail\\*" . mail-mode) ;; Get rid of any trailing .n.m and try again. ;; This is for files saved by cvs-merge that look like .#<file>.<rev> - ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~ - ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t) -;;; The following should come after the ChangeLog pattern -;;; for the sake of ChangeLog.1, etc. -;;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. + ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~. + ;; Using mode nil rather than `ignore' would let the search continue + ;; through this list (with the shortened name) rather than start over. + ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" ignore t) + ;; The following should come after the ChangeLog pattern + ;; for the sake of ChangeLog.1, etc. + ;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. ("\\.[12345678]\\'" . nroff-mode) ("\\.g\\'" . antlr-mode))) "Alist of filename patterns vs corresponding major mode functions. @@ -2107,8 +2109,8 @@ (setq backup-info (find-backup-file-name real-file-name) backupname (car backup-info) targets (cdr backup-info)) -;;; (if (file-directory-p buffer-file-name) -;;; (error "Cannot save buffer in directory %s" buffer-file-name)) + ;; (if (file-directory-p buffer-file-name) + ;; (error "Cannot save buffer in directory %s" buffer-file-name)) (if backup-info (condition-case () (let ((delete-old-versions