Commit cae111fa authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(set-auto-mode): Discard versions from file name before

testing inhibit-first-line-modes-regexps.
parent b79164c7
......@@ -929,10 +929,11 @@ If `enable-local-variables' is nil, this function does not check for a
(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
......
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