aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-04-03 21:37:39 +0000
committerKarl Heuer1995-04-03 21:37:39 +0000
commit38832b4c51178aaf2fc0664cf8c9b7c4fe4a5a7b (patch)
tree7c8bf4fb7b405798a80681ca5850318342649053
parentd007f5c88942066223e6f8dc847771da917fa8c3 (diff)
downloademacs-38832b4c51178aaf2fc0664cf8c9b7c4fe4a5a7b.tar.gz
emacs-38832b4c51178aaf2fc0664cf8c9b7c4fe4a5a7b.zip
(set-auto-mode): Fix previous change.
-rw-r--r--lisp/files.el7
1 files changed, 5 insertions, 2 deletions
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
948 ;; of the regexps in inhibit-first-line-modes-regexps. 948 ;; of the regexps in inhibit-first-line-modes-regexps.
949 (let ((temp inhibit-first-line-modes-regexps) 949 (let ((temp inhibit-first-line-modes-regexps)
950 (name (file-name-sans-versions buffer-file-name))) 950 (name (file-name-sans-versions buffer-file-name)))
951 (if (string-match inhibit-first-line-modes-suffixes name) 951 (while (let ((sufs inhibit-first-line-modes-suffixes))
952 (setq name (substring name 0 (match-beginning 0)))) 952 (while (and sufs (not (string-match (car sufs) name)))
953 (setq sufs (cdr sufs)))
954 sufs)
955 (setq name (substring name 0 (match-beginning 0))))
953 (while (and temp 956 (while (and temp
954 (not (string-match (car temp) name))) 957 (not (string-match (car temp) name)))
955 (setq temp (cdr temp))) 958 (setq temp (cdr temp)))