* File mode specification error: (invalid-regexp "Invalid regular expression")
@ 2008-07-26 14:42 Roberto Bernetti
2008-07-26 18:36 ` Peter Dyballa
0 siblings, 1 reply; 4+ messages in thread
From: Roberto Bernetti @ 2008-07-26 14:42 UTC (permalink / raw)
To: help-gnu-emacs
Hi
I'm using opensuse 10.2 with GNU Emacs 21.3.1
emacs the following line working in in my gnu-emacs-custom file:
--------------------------
;; Modifying alist
(setq auto-mode-alist
(cons '("\\.max" . maxima-mode) auto-mode-alist) )
(setq auto-mode-alist
(cons '("\\.m$" . octave-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\_dbg$" . makefile-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.fi$" . fortran-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '(".gnu-emacs-custom$" . lisp-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("smb\\.conf$" . smb-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.mc$" . maxima-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.mx$" . maxima-mode) auto-mode-alist))
no more work in opensuse 11.0 with GNU Emacs 22.2.1.
I get the following error loading any file i the previous list:
File mode specification error: (invalid-regexp "Invalid regular expression")
browsing the mailing list I changed to
(add-to-list 'auto-mode-alist '("\\.fi$" . fortran-mode))
but for the string:
(add-to-list 'auto-mode-alist '("\\_dbg$" . makefile-mode))
I still get the previous error.
P.S. I'm not in the list.
--
Saluti
Roberto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: File mode specification error: (invalid-regexp "Invalid regular expression")
[not found] <mailman.15448.1217089300.18990.help-gnu-emacs@gnu.org>
@ 2008-07-26 16:50 ` Pascal J. Bourguignon
2008-07-26 16:55 ` Cor Gest
1 sibling, 0 replies; 4+ messages in thread
From: Pascal J. Bourguignon @ 2008-07-26 16:50 UTC (permalink / raw)
To: help-gnu-emacs
Roberto Bernetti <roberto.bernetti@poste.it> writes:
> I get the following error loading any file i the previous list:
>
> File mode specification error: (invalid-regexp "Invalid regular expression")
> [...] for the string:
> (add-to-list 'auto-mode-alist '("\\_dbg$" . makefile-mode))
_ is no special character for regular expressions. You don't need to escape it.
(add-to-list 'auto-mode-alist '("_dbg$" . makefile-mode))
--
__Pascal Bourguignon__ http://www.informatimago.com/
This is a signature virus. Add me to your signature and help me to live.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: File mode specification error: (invalid-regexp "Invalid regular expression")
[not found] <mailman.15448.1217089300.18990.help-gnu-emacs@gnu.org>
2008-07-26 16:50 ` File mode specification error: (invalid-regexp "Invalid regular expression") Pascal J. Bourguignon
@ 2008-07-26 16:55 ` Cor Gest
1 sibling, 0 replies; 4+ messages in thread
From: Cor Gest @ 2008-07-26 16:55 UTC (permalink / raw)
To: help-gnu-emacs
The entity, AKA Roberto Bernetti <roberto.bernetti@poste.it> wrote :
(selectively-snipped-or-not-P)
> Hi
> I'm using opensuse 10.2 with GNU Emacs 21.3.1
> emacs the following line working in in my gnu-emacs-custom file:
> --------------------------
> ;; Modifying alist
> (setq auto-mode-alist
> (cons '("\\.max" . maxima-mode) auto-mode-alist) )
.......................^ "$" is lacking here ..;-)
;;;;(setq auto-mode-alist
;;;; (cons '("\\.max$" . maxima-mode) auto-mode-alist) )
This should solve that.
Cor
--
Mijn Tools zijn zo modern dat ze allemaal eindigen op 'saurus'
(defvar My-Computer '((OS . "GNU/Emacs") (IPL . "GNU/Linux")))
SPAM DELENDA EST http://www.clsnet.nl/mail.php
Ik ontwerp schpellvauden, ergo innoveer taal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: File mode specification error: (invalid-regexp "Invalid regular expression")
2008-07-26 14:42 Roberto Bernetti
@ 2008-07-26 18:36 ` Peter Dyballa
0 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2008-07-26 18:36 UTC (permalink / raw)
To: roberto.bernetti; +Cc: help-gnu-emacs
Am 26.07.2008 um 16:42 schrieb Roberto Bernetti:
> (setq auto-mode-alist
> (cons '("\\.mc$" . maxima-mode) auto-mode-alist))
> (setq auto-mode-alist
> (cons '("\\.mx$" . maxima-mode) auto-mode-alist))
``$´´ stands for end of line, ``'´´ means end of word or string. This
can make a difference with:
emacs <file1.mc> <file2.mx>
You could simplify (really?) these lines to:
(setq auto-mode-alist
(cons '("\\.m\\(c\\|x\\)\\'" . maxima-mode) auto-mode-alist))
--
Greetings
Pete
~ o
~_\\_/\
~ O O
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-26 18:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.15448.1217089300.18990.help-gnu-emacs@gnu.org>
2008-07-26 16:50 ` File mode specification error: (invalid-regexp "Invalid regular expression") Pascal J. Bourguignon
2008-07-26 16:55 ` Cor Gest
2008-07-26 14:42 Roberto Bernetti
2008-07-26 18:36 ` Peter Dyballa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).