From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hadron Quark Newsgroups: gmane.emacs.help Subject: Re: modes not doing much Date: Sat, 12 Aug 2006 15:27:15 +0200 Message-ID: <87mzaaqe30.fsf@mail.com> References: <44ddb5f9$0$15781$14726298@news.sunsite.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155390044 10138 80.91.229.2 (12 Aug 2006 13:40:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Aug 2006 13:40:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 12 15:40:43 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 1GBtj1-0001zb-GG for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Aug 2006 15:40:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBtj1-0005iL-1S for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Aug 2006 09:40:27 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 71 Original-X-Trace: individual.net KeXmpTvonI70eJ42HHkN/ggSR2LqhKyE/UaAElErGiQgceFm7r X-Orig-Path: news.ibm.net!news X-Face: 2h#||Cd#d%F*NCm59[_6/{1a@jy%; |j>{D~4^gKg(^i%7j0IK?+,/GmW&:CD5fEKb_! User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:R1pzWo0F3Wb82ttv40eVmkHznv0= Original-Xref: shelby.stanford.edu gnu.emacs.help:141005 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:36630 Archived-At: "Colin S. Miller" writes: > 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 I have (global-font-lock-mode 1) in my .emacs. Using emacs-snaphot ,---- | GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of | 2006-01-16 on vernadsky, modified by Debian `---- I have to refresh the screen (hilite & unhilite) the text for c mode hiliting to start working. Why is this? > > 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. --