diff lisp/files.el @ 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 da491f38518c
children 18c1f0c8c6ec
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