From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Colin S. Miller" Newsgroups: gmane.emacs.help Subject: Re: modes not doing much Date: Sat, 12 Aug 2006 12:05:43 +0100 Organization: SunSITE.dk - Supporting Open source Message-ID: <44ddb5f9$0$15781$14726298@news.sunsite.dk> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1155383343 26107 80.91.229.2 (12 Aug 2006 11:49:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Aug 2006 11:49:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 12 13:49:02 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBrrH-0001DH-Ha for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Aug 2006 13:40:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBrrH-00063O-33 for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Aug 2006 07:40:51 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!colt.net!feeder.news-service.com!feeder2.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!amsnews11.chello.com!news.szn.dk!pnx.dk!dotsrc.org!news.dotsrc.org!not-for-mail User-Agent: Thunderbird 1.5.0.4 (X11/20060713) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 51 Original-NNTP-Posting-Host: 62.56.73.25 Original-X-Trace: news.sunsite.dk DXC=W9jOVhR3JDF?ZCK:; haR=OYSB=nbEKnkKZ:[n_Bml[hGG1[Bg<0aH5@\VT\m5_SIbFU_42Df:PaKHTcL2h5ahoTOkF_>m>CYcVO05M[i0M\K Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:141003 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36628 Archived-At: YAD wrote: > So far I've used Ruby mode and HTML mode. > No colors, no auto-indent on . > > 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.