unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* File mode specification error?
@ 2007-06-04 19:07 troelskn
  2007-06-04 19:11 ` Joel J. Adamson
  0 siblings, 1 reply; 3+ messages in thread
From: troelskn @ 2007-06-04 19:07 UTC (permalink / raw)
  To: help-gnu-emacs

(newbie-warning)

I just installed emacs 22 on windows. If I open up a *.el file, there
is no font-lock, and I get the following error message:

File mode specification error: (wrong-type-argument stringp ("\\.dz\
\'" nil jka-compr))

Anyone have an idea about, what that is?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: File mode specification error?
  2007-06-04 19:07 File mode specification error? troelskn
@ 2007-06-04 19:11 ` Joel J. Adamson
  2007-06-04 19:27   ` troelskn
  0 siblings, 1 reply; 3+ messages in thread
From: Joel J. Adamson @ 2007-06-04 19:11 UTC (permalink / raw)
  To: help-gnu-emacs

troelskn <troelskn@gmail.com> writes:

> (newbie-warning)
>
> I just installed emacs 22 on windows. If I open up a *.el file, there
> is no font-lock, and I get the following error message:
>
> File mode specification error: (wrong-type-argument stringp ("\\.dz\
> \'" nil jka-compr))
>
> Anyone have an idea about, what that is?


That's a regular expression my friend, the way emacs identifies file
types (in this case).  Read the friendly manual on Emacs/POSIX regular
expression syntax under "M-x info" (this takes you into info mode,
then you can read the Emacs manual, a chapter of which is dedicated to
regular expressions).

As annoying as the message is, you can enable font-lock by typing "M-x
font-lock-mode RET" or putting 

;; Global font-lock mode
(global-font-lock-mode 1)
 
into your .emacs file.  This enables font lock by default for every
buffer.  I love it.  Every buffer comes up all colorful...

By your newbie warning, do you mean you're new to Emacs, or new to
Emacs 22?



-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: File mode specification error?
  2007-06-04 19:11 ` Joel J. Adamson
@ 2007-06-04 19:27   ` troelskn
  0 siblings, 0 replies; 3+ messages in thread
From: troelskn @ 2007-06-04 19:27 UTC (permalink / raw)
  To: help-gnu-emacs

> That's a regular expression my friend, the way emacs identifies file
> types (in this case).  Read the friendly manual on Emacs/POSIX regular
Ah ... that makes sense then. I had copy-pasted the following code to
bind filename to mode:
(setq auto-mode-alist
  (append
    (list
      '("\\.php" . php-mode)
        auto-mode-alist)))

Replacing with this, fixed the problem:
(add-to-list 'auto-mode-alist
             '("\\.php$" . php-mode))

Thanks for pointing me in the right direction.

--
troels

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-04 19:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 19:07 File mode specification error? troelskn
2007-06-04 19:11 ` Joel J. Adamson
2007-06-04 19:27   ` troelskn

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).