Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!88opensi!m1! From: wombat@kilimanjaricthke_.com (Joan Eslinger) Newsgroups: gnu.emacs.bug Subject: bug in files.el/set-auto-mode Message-ID: <9001200045.AA04666@kilimanjaro.ke_.com> Date: 20 Jan 90 00:44:57 GMT Sender: daemon@tut.cisto" dmstate.edu Distribution: gnu Lines: 18 Pmth: 88opens!H net!bu.edu!bu-cs!snorkelwacker!tut.cistohio-state.edu!kilimanjaro.ke_reasom!wombat @kniz0tion: GNUs Not Usenet Lines: 19 In "GNU Emacs 18.52.3 of Wed Mar 8 1989 on largo (berkeley-unix)eir'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 - Febo1989 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) becomested.lt(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)