diff options
| author | Richard M. Stallman | 1994-10-04 02:56:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-04 02:56:49 +0000 |
| commit | cae111fa0d6a8dc3f90b991a81be280da5b3dc22 (patch) | |
| tree | b71b6c3c5542d320e04e67700b5a6bd18ae79792 | |
| parent | b79164c7c6f7fc1e22deaf2f9f6dfeae897c9578 (diff) | |
| download | emacs-cae111fa0d6a8dc3f90b991a81be280da5b3dc22.tar.gz emacs-cae111fa0d6a8dc3f90b991a81be280da5b3dc22.zip | |
(set-auto-mode): Discard versions from file name before
testing inhibit-first-line-modes-regexps.
| -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 | |||
| 929 | (and enable-local-variables | 929 | (and enable-local-variables |
| 930 | ;; Don't look for -*- if this file name matches any | 930 | ;; Don't look for -*- if this file name matches any |
| 931 | ;; of the regexps in inhibit-first-line-modes-regexps. | 931 | ;; of the regexps in inhibit-first-line-modes-regexps. |
| 932 | (let ((temp inhibit-first-line-modes-regexps)) | 932 | (let ((temp inhibit-first-line-modes-regexps) |
| 933 | (name (file-name-sans-versions buffer-file-name))) | ||
| 933 | (while (and temp | 934 | (while (and temp |
| 934 | (not (string-match (car temp) | 935 | (not (string-match (car temp) |
| 935 | buffer-file-name))) | 936 | name))) |
| 936 | (setq temp (cdr temp))) | 937 | (setq temp (cdr temp))) |
| 937 | (not temp)) | 938 | (not temp)) |
| 938 | (search-forward "-*-" (save-excursion | 939 | (search-forward "-*-" (save-excursion |