From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael M Mason Newsgroups: gmane.emacs.help Subject: Re: Emacs newbie - Syntax Highlighting and Indentation Date: Fri, 14 Nov 2003 18:08:10 +0000 Organization: Cambridge Optical Group Ltd Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: Reply-To: admin@cambridge-optical.com NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1068833708 5907 80.91.224.253 (14 Nov 2003 18:15:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2003 18:15:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 14 19:15:04 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AKiTI-000424-00 for ; Fri, 14 Nov 2003 19:15:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKjQ6-00087B-JX for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2003 14:15:50 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!mephistopheles.news.clara.net!newspeer.clara.net!news.clara.net!lotis.uk.clara.net Original-Newsgroups: gnu.emacs.help X-Newsreader: Forte Agent 1.9/32.560 Original-X-Complaints-To: abuse@clara.net (please include full headers) Original-X-Trace: 12203c34e15818e2a3302097d97322395850933c0e3e22a43e5238803fb51a0b Original-NNTP-Posting-Date: Fri, 14 Nov 2003 18:08:11 +0000 Original-Lines: 39 Original-Xref: shelby.stanford.edu gnu.emacs.help:118261 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14202 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14202 On Fri, 14 Nov 2003 16:52:12 +0100, David Rasmussen wrote: >I've installed the Windows version of Emacs 21.3.1. >I have read some tutorials, but I have two questions (for now): > >1) How do I enable syntax highlighting by default, for any type of file >/ extension / mode that supports it? I have enabled it in the Options >menu, and saved my options. But isn't there a non-menu-way of doing >this, so I can get to learn and understand how to configure emacs myself? Customisations are saved in a file called .emacs which is stored in your home directory. Unless you've taken steps to tell it otherwise, Emacs will very probably be using the root directory of your C: drive as your home directory. You can open your .emacs using C-x C-f and specifying ~/.emacs as the filename. In order to find out what you can put in your .emacs, select "Read the Emacs Manual" from the "Help" menu and check out the "Init File" sections. You will probably also want to have a look at "font-locking" (the name for syntax highlighting). The commands that you will most likely want to put in your .emacs are: (global-font-lock-mode t) (setq font-lock-maximum-decoration t) (transient-mark-mode t) There's a lot of Windows-specific information at: http://www.gnu.org/software/emacs/windows/faq.html and there's plenty of .emacs stuff at: http://www.dotemacs.de/ -- Michael