Commit 6054fcc6 authored by Karl Heuer's avatar Karl Heuer
Browse files

(set-auto-mode): Don't get confused by anything ending in "mode:" which isn't

a mode spec.
parent 26b6f040
......@@ -966,7 +966,9 @@ If `enable-local-variables' is nil, this function does not check for a
;; Find all specifications for the `mode:' variable
;; and execute them left to right.
(while (let ((case-fold-search t))
(search-forward "mode:" end t))
(or (and (looking-at "mode:")
(goto-char (match-end 0)))
(re-search-forward "[ \t;]mode:" end t)))
(skip-chars-forward " \t")
(setq beg (point))
(if (search-forward ";" end t)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment