Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!kilimanjaro.key.com!wombat From: wombat@kilimanjaro.key.com (Joan Eslinger) Newsgroups: gnu.emacs.bug Subject: bug in files.el/set-auto-mode Message-ID: <9001200045.AA04666@kilimanjaro.key.com> Date: 20 Jan 90 00:44:57 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 19 In "GNU Emacs 18.52.3 of Wed Mar 8 1989 on largo (berkeley-unix)" Automode setting is supposed to happen if -*- MODENAME -*- is in the first non-blank line of a file, but because * is special even in non-regexp searches if you happen to have a line like # Key Computer Laboratories, Inc. (KCL) - System V - Feb 1989 as the first line, emacs will try to set the file to (non-existent) "system" mode. This can be fixed by changing two lines in files.el: (if (and (search-forward "-*-" (save-excursion (end-of-line) (point)) t) becomes (if (and (re-search-forward "-[*]-" (save-excursion (end-of-line) (point)) t) (search-forward "-*-" (save-excursion (end-of-line) (point)) t)) becomes (re-search-forward "-[*]-" (save-excursion (end-of-line) (point)) t))