From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: john.nospam@nospamassen.nospamdemon.co.uk (John McCabe) Newsgroups: gmane.emacs.help Subject: Re: Enabling global-font-lock-mode Date: Fri, 25 Oct 2002 09:42:17 GMT Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3db910eb.6104998@news.demon.co.uk> References: <3db823f4.31009449@news.demon.co.uk> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1035539129 18239 80.91.224.249 (25 Oct 2002 09:45:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 25 Oct 2002 09:45:29 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18511z-0004ju-00 for ; Fri, 25 Oct 2002 11:45:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 1850y7-0002nn-00; Fri, 25 Oct 2002 05:41:27 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!colt.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: pipehawk.demon.co.uk Original-X-Trace: news.demon.co.uk 1035538692 6552 158.152.226.81 (25 Oct 2002 09:38:12 GMT) Original-X-Complaints-To: abuse@demon.net Original-NNTP-Posting-Date: Fri, 25 Oct 2002 09:38:12 +0000 (UTC) X-Newsreader: Forte Free Agent 1.21/32.243 Original-Xref: shelby.stanford.edu gnu.emacs.help:106370 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2920 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2920 On Thu, 24 Oct 2002 20:11:27 +0200, Florian Lindner wrote: >John McCabe wrote: > >> On Thu, 24 Oct 2002 17:39:29 +0200, Florian Lindner >> wrote: >> >>>Hello, >>>I want to enable Syntax Highlightning (Global font lock mode) >>>Using this expression in my .emacs file is evaluated without errors but >>>don't take effect. What's wrong? >>> >>>'(global-font-lock-mode t nil (font-lock)) >> >> What version of Emacs are you using? If anything after 20.0, use the >> "Customize" features to do it rather than edit your .emacs. >> >> It may be under the "Help" menu, or the "Options" menu. Find the >> "Customize" menu, then "Specific Option" and enter >> global-font-lock-mode when asked. > >I prefer to edit the .emacs directly, it's a greater learn effect and I >don't like to use things that I don't understand. Unfortunately it's also a greater risk that it won't work on future versions! Customize is there to make things easier for you, it is simple, generally reliable, and *should* be consistent. That can't be said for hand-editing .emacs. If you really want to hand-edit .emacs, use Customize instead then look at the difference when you set a value. In your original question you said you had added: '(global-font-lock-mode t nil (font-lock)) Now, if that was somewhere within the (custom-set-variables ... ) block, it should have worked *unless* you had something hand-edited elsewhere that switched it back off. If you just put that line in outside the custom-set-variables block it isn't going to work.