From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jiri Pejchal Newsgroups: gmane.emacs.help Subject: Re: Emacs newbie - Syntax Highlighting and Indentation Date: Fri, 14 Nov 2003 17:48:10 GMT Organization: unknown Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068832904 3960 80.91.224.253 (14 Nov 2003 18:01:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2003 18:01:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 14 19:01:40 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 1AKiGK-00035O-00 for ; Fri, 14 Nov 2003 19:01:40 +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 1AKjCH-00044v-VG for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2003 14:01:33 -0500 Original-Newsgroups: gnu.emacs.help Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-FFM2.ecrc.net!news.cesnet.cz!crax.cesnet.cz!news.vutbr.cz!news.muni.cz!news User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Lines: 36 X-Nntp-Posting-Host: nymfe04.fi.muni.cz Original-Xref: shelby.stanford.edu gnu.emacs.help:118259 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:14201 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14201 David Rasmussen writes: > 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? Put (global-font-lock-mode 1) in your .emacs (maybe it's _emacs on Windows) -- that is configuration file for Emacs. (You don't have to do it if you have saved the options). Start with Control-h t --> tutorial Then you can start reading manual: Control-h i Emacs RETURN > > 2) When I edit a java file, the Java major mode i automatically > loaded. But when I press TAB at the beginning of a new line, i get > an indentation of 4 spaces. How do I alter this to 2 spaces (setq c-basic-offset 2) > instead? Or any other number of spaces? What if I want to get a tab > character instead of spaces, when indenting (I really don't, but I > would like to know)? Everything is possible, just read the manual:-) -- Jiri Pejchal