Mercurial > emacs
comparison lisp/files.el @ 10132:d6ab8efcd2ff
(set-auto-mode): Don't get confused by anything ending in "mode:" which isn't
a mode spec.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 09 Dec 1994 06:14:44 +0000 |
parents | e797886a4244 |
children | c1704135914f |
comparison
equal
deleted
inserted
replaced
10131:51b28b893fea | 10132:d6ab8efcd2ff |
---|---|
964 (goto-char beg) | 964 (goto-char beg) |
965 (if (save-excursion (search-forward ":" end t)) | 965 (if (save-excursion (search-forward ":" end t)) |
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) |
973 (forward-char -1) | 975 (forward-char -1) |
974 (goto-char end)) | 976 (goto-char end)) |