help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: did syntax for setq auto-mode-alist or regexp change with 21.3.1?


From: Kevin Rodgers
Subject: Re: did syntax for setq auto-mode-alist or regexp change with 21.3.1?
Date: Thu, 30 Jun 2005 14:48:12 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Tom wrote:
> This worked with emacs 20.7.1 on Linux
>
> (setq auto-mode-alist (cons
> `("makefile\\(\\.aix\\|\\.hp\\|\\.sol\\|\\.linux\\|\\.gcc\\)\\'".makefile-mode)
> auto-mode-alist))
>
> With emacs 21.3.1 on Linux I get this error for the above syntax:
>
> File mode specification error: (invalid-function (\.makefile-mode))
>
> I had to do it this way to get it to work in emacs 21.3.1 on Linux
>
> (setq auto-mode-alist (cons `( "makefile\\.linux" . makefile-mode )
> auto-mode-alist ))
> (setq auto-mode-alist (cons `( "makefile\\.sol" . makefile-mode )
> auto-mode-alist ))
> (setq auto-mode-alist (cons `( "makefile\\.aix" . makefile-mode )
> auto-mode-alist ))
> (setq auto-mode-alist (cons `( "makefile\\.hp" . makefile-mode )
> auto-mode-alist ))
> (setq auto-mode-alist (cons `( "makefile\\.gcc" . makefile-mode )
> auto-mode-alist ))

No, you just need to put spaces around the dot that's between the
complex regexp and the function.

> Any ideas why the first form no longer works?

To get you to clean up your code :-)

Since dot is a valid character in a symbol name, the Lisp reader
requires surrounding whitespace in order to interpret it as the infix
cons operator.

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]