changeset 9251:2ecfcd3f778c

(set-auto-mode): Discard versions from file name before testing inhibit-first-line-modes-regexps.
author Richard M. Stallman <rms@gnu.org>
date Tue, 04 Oct 1994 02:56:49 +0000
parents 7cf726dccf2e
children 8c659649649e
files lisp/files.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Mon Oct 03 22:57:43 1994 +0000
+++ b/lisp/files.el	Tue Oct 04 02:56:49 1994 +0000
@@ -929,10 +929,11 @@
       (and enable-local-variables
 	   ;; Don't look for -*- if this file name matches any
 	   ;; of the regexps in inhibit-first-line-modes-regexps.
-	   (let ((temp inhibit-first-line-modes-regexps))
+	   (let ((temp inhibit-first-line-modes-regexps)
+		 (name (file-name-sans-versions buffer-file-name)))
 	     (while (and temp
 			 (not (string-match (car temp)
-					    buffer-file-name)))
+					    name)))
 	       (setq temp (cdr temp)))
 	     (not temp))
 	   (search-forward "-*-" (save-excursion