From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Robert P. J. Day" Newsgroups: gmane.emacs.help Subject: another newbie question -- auto-mode-alist regexp Date: Mon, 23 Sep 2002 18:43:59 -0400 (EDT) Sender: help-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1032821013 2544 127.0.0.1 (23 Sep 2002 22:43:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 23 Sep 2002 22:43:33 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17tbvO-0000em-00 for ; Tue, 24 Sep 2002 00:43:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tbvL-0000kY-00; Mon, 23 Sep 2002 18:43:27 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17tbuN-0000fl-00 for help-gnu-emacs@gnu.org; Mon, 23 Sep 2002 18:42:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17tbuL-0000fW-00 for help-gnu-emacs@gnu.org; Mon, 23 Sep 2002 18:42:26 -0400 Original-Received: from tomts16-srv.bellnexxia.net ([209.226.175.4]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tbuL-0000fQ-00 for help-gnu-emacs@gnu.org; Mon, 23 Sep 2002 18:42:25 -0400 Original-Received: from dell ([65.93.97.112]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20020923224223.PTHW15333.tomts16-srv.bellnexxia.net@dell> for ; Mon, 23 Sep 2002 18:42:23 -0400 X-X-Sender: rpjday@dell Original-To: GNU emacs mailing list Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1756 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1756 i've looked through both the emacs and elisp info pages, and i haven't found a simple explanation for the syntax of the expression for setting the auto-mode-alist in my .emacs. a couple of examples that are part of the (add-to-list 'auto-mode-alist ... when i bring up online help within emacs on the variable auto-mode-alist: ("\\.xml\\'" . xml-mode) ("\\.spec$" . rpm-spec-mode) ("\\.php[34]\\'\\|\\.php\\'\\|\\.phtml\\'" . php-mode) what i haven't figured out yet: 1) what means the sequence \\', as in what you see after ".xml" in that first example? i can understand everything else, but that baffles me. 2) i assume that the "$" after .spec means end of string, which is familiar. i'm curious why a lot of the other suffix regexp matches also don't match to end of string. like the first one, .xml. just curious. 3) regarding the php example, couldn't that have been written as ("\\.php[34]?\\'\\|\\.phtml\\'" . php-mode) (this assumes that i still don't know what \\' means.) a pointer to the correct online help or info page would do nicely. thanks for your patience. rday