Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!cornell!rochester!bbn!bbn.com!mesard
From: mesard@bbn.com (Wayne Mesard)
Newsgroups: comp.emacs
Subject: Re: auto-mode-alist bug?/question
Message-ID: <26352@bbn.COM>
Date: 29 Jun 88 15:45:49 GMT
References: <724@ubu.warwick.UUCP>
Sender: news@bbn.COM
Lines: 47

From article <724@ubu.warwick.UUCP>, by maujd@warwick.UUCP (Geoff Rimmer):
> In article <25679@bbn.COM> mesard@BBN.COM writes:
>}I thought that the following in my auto-mode-alist, would match all
>}filenames that begin with a dot:
>}
>}	("^\\." . fundamental-mode)
>}
>}It doesn't seem to match anything.  Bug?  Suggestions?  This is 
>}GnuEmacs 18.51.5.
> 
> I don't know anything about the auto-mode-alist thing, but surely the
> regular expression to match something beginning with a dot would be
> 
> 	"^\."
> 	  ^--------only 1 backslash
> 

Well, the first part of that sentence is correct, as to the rest, page
108 of my manual says (among other things), "Note that '\\' is needed in
Lisp syntax to include a '\' in the string, which is needed to suppress
the special meaning of '.' in regexps."

The solution you provide will match every filename with one or more
characters (most of them, I should think:-).

>}Also, would anyone care to provide a regexp that will only match filenames
>}which DO NOT contain a dot.
> 
[incorrect solution deleted.]

I tried "[^\\.]" before posting my 13 June article.  It doesn't match
anything.

So my questions still stand.  Is this a bug?  Any fixes?
Thanks.

> 	------------------------------------------------------------
> 	Geoff Rimmer, Computer Science, Warwick University, UK.
> 			maujd@uk.ac.warwick.opal

-- 
unsigned *Wayne_Mesard();        MESARD@BBN.COM        BBN Labs, Cambridge, MA

Is it because of the people you hang around with that you say you do not
need dan rather?
			M-x psychoanalyze-pinhead
(Gee, whataneditor!!)