From: Karl Heuer Date: Mon, 3 Apr 1995 21:37:39 +0000 (+0000) Subject: (set-auto-mode): Fix previous change. X-Git-Tag: emacs-19.34~4669 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38832b4c51178aaf2fc0664cf8c9b7c4fe4a5a7b;p=emacs.git (set-auto-mode): Fix previous change. --- diff --git a/lisp/files.el b/lisp/files.el index 1a0bc74ea94..199f9b13731 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -948,8 +948,11 @@ If `enable-local-variables' is nil, this function does not check for a ;; 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)))