diff options
| author | Karl Heuer | 1994-12-09 06:14:44 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-12-09 06:14:44 +0000 |
| commit | 6054fcc6452dd2ecf707ed9e616ea8c568f6bb52 (patch) | |
| tree | 29b883dcfc5c72e4061421ca2f638b9bdcaec723 | |
| parent | 26b6f040831c99ec0a15452cf61636acfd7b98ef (diff) | |
| download | emacs-6054fcc6452dd2ecf707ed9e616ea8c568f6bb52.tar.gz emacs-6054fcc6452dd2ecf707ed9e616ea8c568f6bb52.zip | |
(set-auto-mode): Don't get confused by anything ending in "mode:" which isn't
a mode spec.
| -rw-r--r-- | lisp/files.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index e226461bd83..42eea31d170 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -966,7 +966,9 @@ If `enable-local-variables' is nil, this function does not check for a | |||
| 966 | ;; Find all specifications for the `mode:' variable | 966 | ;; Find all specifications for the `mode:' variable |
| 967 | ;; and execute them left to right. | 967 | ;; and execute them left to right. |
| 968 | (while (let ((case-fold-search t)) | 968 | (while (let ((case-fold-search t)) |
| 969 | (search-forward "mode:" end t)) | 969 | (or (and (looking-at "mode:") |
| 970 | (goto-char (match-end 0))) | ||
| 971 | (re-search-forward "[ \t;]mode:" end t))) | ||
| 970 | (skip-chars-forward " \t") | 972 | (skip-chars-forward " \t") |
| 971 | (setq beg (point)) | 973 | (setq beg (point)) |
| 972 | (if (search-forward ";" end t) | 974 | (if (search-forward ";" end t) |