diff options
| author | Stefan Monnier | 2001-05-11 20:22:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-05-11 20:22:46 +0000 |
| commit | 5c6d31a48f29aa04cfae76f8f3a2593b77e7cfa7 (patch) | |
| tree | d7e2ac0b349b7ece6e41bd88fc78b2dc7d2e4bc6 | |
| parent | 7b2654b53a011af9b08a2ee00725877b7a1ec95a (diff) | |
| download | emacs-5c6d31a48f29aa04cfae76f8f3a2593b77e7cfa7.tar.gz emacs-5c6d31a48f29aa04cfae76f8f3a2593b77e7cfa7.zip | |
(auto-mode-alist): Add *.perl and fix the *.<rev> case.
| -rw-r--r-- | lisp/files.el | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/files.el b/lisp/files.el index ae2b474eea7..0e99520c4b1 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -68,7 +68,7 @@ the name it is linked to." | |||
| 68 | :group 'abbrev | 68 | :group 'abbrev |
| 69 | :group 'find-file) | 69 | :group 'find-file) |
| 70 | 70 | ||
| 71 | ;;; Turn off backup files on VMS since it has version numbers. | 71 | ;; Turn off backup files on VMS since it has version numbers. |
| 72 | (defcustom make-backup-files (not (eq system-type 'vax-vms)) | 72 | (defcustom make-backup-files (not (eq system-type 'vax-vms)) |
| 73 | "*Non-nil means make a backup of a file the first time it is saved. | 73 | "*Non-nil means make a backup of a file the first time it is saved. |
| 74 | This can be done by renaming the file or by copying. | 74 | This can be done by renaming the file or by copying. |
| @@ -1347,7 +1347,7 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1347 | ("\\.p\\'" . pascal-mode) | 1347 | ("\\.p\\'" . pascal-mode) |
| 1348 | ("\\.pas\\'" . pascal-mode) | 1348 | ("\\.pas\\'" . pascal-mode) |
| 1349 | ("\\.ad[abs]\\'" . ada-mode) | 1349 | ("\\.ad[abs]\\'" . ada-mode) |
| 1350 | ("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode) | 1350 | ("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" . perl-mode) |
| 1351 | ("\\.s?html?\\'" . html-mode) | 1351 | ("\\.s?html?\\'" . html-mode) |
| 1352 | ("\\.cc\\'" . c++-mode) | 1352 | ("\\.cc\\'" . c++-mode) |
| 1353 | ("\\.hh\\'" . c++-mode) | 1353 | ("\\.hh\\'" . c++-mode) |
| @@ -1364,8 +1364,8 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1364 | ("\\.mk\\'" . makefile-mode) | 1364 | ("\\.mk\\'" . makefile-mode) |
| 1365 | ("\\(M\\|m\\|GNUm\\)akefile\\(\\.in\\)?\\'" . makefile-mode) | 1365 | ("\\(M\\|m\\|GNUm\\)akefile\\(\\.in\\)?\\'" . makefile-mode) |
| 1366 | ("\\.am\\'" . makefile-mode) ;For Automake. | 1366 | ("\\.am\\'" . makefile-mode) ;For Automake. |
| 1367 | ;;; Less common extensions come here | 1367 | ;; Less common extensions come here |
| 1368 | ;;; so more common ones above are found faster. | 1368 | ;; so more common ones above are found faster. |
| 1369 | ("\\.texinfo\\'" . texinfo-mode) | 1369 | ("\\.texinfo\\'" . texinfo-mode) |
| 1370 | ("\\.te?xi\\'" . texinfo-mode) | 1370 | ("\\.te?xi\\'" . texinfo-mode) |
| 1371 | ("\\.s\\'" . asm-mode) | 1371 | ("\\.s\\'" . asm-mode) |
| @@ -1455,11 +1455,13 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1455 | ("#\\*mail\\*" . mail-mode) | 1455 | ("#\\*mail\\*" . mail-mode) |
| 1456 | ;; Get rid of any trailing .n.m and try again. | 1456 | ;; Get rid of any trailing .n.m and try again. |
| 1457 | ;; This is for files saved by cvs-merge that look like .#<file>.<rev> | 1457 | ;; This is for files saved by cvs-merge that look like .#<file>.<rev> |
| 1458 | ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~ | 1458 | ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~. |
| 1459 | ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t) | 1459 | ;; Using mode nil rather than `ignore' would let the search continue |
| 1460 | ;;; The following should come after the ChangeLog pattern | 1460 | ;; through this list (with the shortened name) rather than start over. |
| 1461 | ;;; for the sake of ChangeLog.1, etc. | 1461 | ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" ignore t) |
| 1462 | ;;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. | 1462 | ;; The following should come after the ChangeLog pattern |
| 1463 | ;; for the sake of ChangeLog.1, etc. | ||
| 1464 | ;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. | ||
| 1463 | ("\\.[12345678]\\'" . nroff-mode) | 1465 | ("\\.[12345678]\\'" . nroff-mode) |
| 1464 | ("\\.g\\'" . antlr-mode))) | 1466 | ("\\.g\\'" . antlr-mode))) |
| 1465 | "Alist of filename patterns vs corresponding major mode functions. | 1467 | "Alist of filename patterns vs corresponding major mode functions. |
| @@ -2107,8 +2109,8 @@ no longer accessible under its old name." | |||
| 2107 | (setq backup-info (find-backup-file-name real-file-name) | 2109 | (setq backup-info (find-backup-file-name real-file-name) |
| 2108 | backupname (car backup-info) | 2110 | backupname (car backup-info) |
| 2109 | targets (cdr backup-info)) | 2111 | targets (cdr backup-info)) |
| 2110 | ;;; (if (file-directory-p buffer-file-name) | 2112 | ;; (if (file-directory-p buffer-file-name) |
| 2111 | ;;; (error "Cannot save buffer in directory %s" buffer-file-name)) | 2113 | ;; (error "Cannot save buffer in directory %s" buffer-file-name)) |
| 2112 | (if backup-info | 2114 | (if backup-info |
| 2113 | (condition-case () | 2115 | (condition-case () |
| 2114 | (let ((delete-old-versions | 2116 | (let ((delete-old-versions |