# HG changeset patch # User Stefan Monnier # Date 989612566 0 # Node ID 3900bbc84b5c4912f83ed4491a395fac7570ea77 # Parent 89381572c3f180c15e99f61fdc03df38644dc2ed (auto-mode-alist): Add *.perl and fix the *. case. diff -r 89381572c3f1 -r 3900bbc84b5c lisp/files.el --- 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 .#. - ;; or .#.- or VC's .~~ - ("\\.~?[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' . patterns too. + ;; or .#.- or VC's .~~. + ;; 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' . 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