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

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

Re: modes not doing much


From: Colin S. Miller
Subject: Re: modes not doing much
Date: Sat, 12 Aug 2006 12:05:43 +0100
User-agent: Thunderbird 1.5.0.4 (X11/20060713)

YAD wrote:
So far I've used Ruby mode and HTML mode.
No colors, no auto-indent on <rtrn>.

So what are the modes doing?  Vim and even the
Firefox source viewer have syntax-based colors.
Isn't Emacs supposed to do that too?

Also, Lisp .cl files and Python .py files are coming up in
Fundamental mode, while OCaml .ml files come up in Lisp mode.
What the heck is going on? :(


Try
M-x font-lock-mode
for colouring

to make this permanent, place this in your .emacs file

(add-hook 'html-mode-hook '(lambda ()
                                 (turn-on-font-lock))

(add-hook 'haskell-mode-hook '(lambda ()
                                 (turn-on-font-lock))


I have auto-indent enabled for C, but I can't see where
it is switched on.



To associate a file name with a mode, use
(add-to-list 'auto-mode-alist '("\\.cl\\'" . lisp-mode) 't)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode) 't)
I can't find the mode for Ocaml - you might need to google for one.


Python should be bound by default - what does
C-h v auto-mode-alist RET
report?



These code snippets are for XEmacs - they should
work on GNU Emacs, but I can't guarantee that.

HTH,
Colin S. Miller

--
Replace the obvious in my email address with the first three letters of the 
hostname to reply.


reply via email to

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