changeset 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 51b28b893fea
children 3f9bc256eb13
files lisp/files.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Thu Dec 08 18:51:35 1994 +0000
+++ b/lisp/files.el	Fri Dec 09 06:14:44 1994 +0000
@@ -966,7 +966,9 @@
 		 ;; Find all specifications for the `mode:' variable
 		 ;; and execute them left to right.
 		 (while (let ((case-fold-search t))
-			  (search-forward "mode:" end t))
+			  (or (and (looking-at "mode:")
+				   (goto-char (match-end 0)))
+			      (re-search-forward "[ \t;]mode:" end t)))
 		   (skip-chars-forward " \t")
 		   (setq beg (point))
 		   (if (search-forward ";" end t)