changeset 11189:a2a85a29cdd6

(set-auto-mode): Fix previous change.
author Karl Heuer <kwzh@gnu.org>
date Mon, 03 Apr 1995 21:37:39 +0000
parents d7f70df00bb0
children 509f78000a59
files lisp/files.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Mon Apr 03 21:34:15 1995 +0000
+++ b/lisp/files.el	Mon Apr 03 21:37:39 1995 +0000
@@ -948,8 +948,11 @@
 	   ;; of the regexps in inhibit-first-line-modes-regexps.
 	   (let ((temp inhibit-first-line-modes-regexps)
 		 (name (file-name-sans-versions buffer-file-name)))
-	     (if (string-match inhibit-first-line-modes-suffixes name)
-		 (setq name (substring name 0 (match-beginning 0))))
+	     (while (let ((sufs inhibit-first-line-modes-suffixes))
+		      (while (and sufs (not (string-match (car sufs) name)))
+			(setq sufs (cdr sufs)))
+		      sufs)
+	       (setq name (substring name 0 (match-beginning 0))))
 	     (while (and temp
 			 (not (string-match (car temp) name)))
 	       (setq temp (cdr temp)))