diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-04 02:56:49 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-04 02:56:49 +0000 |
commit | cae111fa0d6a8dc3f90b991a81be280da5b3dc22 (patch) | |
tree | b71b6c3c5542d320e04e67700b5a6bd18ae79792 /lisp/files.el | |
parent | b79164c7c6f7fc1e22deaf2f9f6dfeae897c9578 (diff) | |
download | emacs-cae111fa0d6a8dc3f90b991a81be280da5b3dc22.tar.gz |
(set-auto-mode): Discard versions from file name before
testing inhibit-first-line-modes-regexps.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 63dd66be1a8..7784cbe2a4b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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 |