From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bijan Soleymani Newsgroups: gmane.emacs.help Subject: Re: syntax coloring os not working!!!!! Date: 02 Jan 2003 03:08:41 -0500 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87n0mknfcm.fsf@hurd.crasseux.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1041494758 8772 80.91.224.249 (2 Jan 2003 08:05:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 2 Jan 2003 08:05:58 +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 18U0MV-0002HJ-00 for ; Thu, 02 Jan 2003 09:05:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18U0M8-0005ii-03 for gnu-help-gnu-emacs@m.gmane.org; Thu, 02 Jan 2003 03:05:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!wesley.videotron.net!weber.videotron.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 61 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 24.203.44.117 Original-X-Complaints-To: abuse@videotron.ca Original-X-Trace: weber.videotron.net 1041494682 24.203.44.117 (Thu, 02 Jan 2003 03:04:42 EST) Original-NNTP-Posting-Date: Thu, 02 Jan 2003 03:04:42 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:108653 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5182 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5182 unni krishnan writes: > > > > hello, > > > > i am a new user (student) of emacs.how can i > > do syntax coloring in emacs? > > > >It's simply, just type: > >M-x global-font-lock-mode > >If you don't have the Meta key (alt should be equal to Meta), you can > >type ESC-x global-font-lock-mode > >To make permanent this configuration, you must edit the .emacs file and > >insert the following line > >(global-font-lock-mode 1) > >   > > hi, > > syntax coloring is not working. What version of emacs are you using? Are you using it in X or the console (emacs only supports colors on text only terminals since version 21)? > thanks for response. i am using a linux 7.2 There is no such thing. Linux is the kernel, the current bleeding edge is around 2.5.36. You must be using a distribution of Linux and some other free software, possibly Red Hat, Mandrake or Slackware. > i have typed the command > >  M-x global-font-lock-mode > > but the result is > > "global font lock mode disabled" That would indicate that it was already enabled, and that you disabled it. What happens if you run M-x global-font-lock-mode again? What are you using highlighting for? If you open a text file (.txt) there (obviously) won't be any highlighting by default. What happens if you open a C source file (.c)? Finally emacs comes with excellent online documentation. Please take the time to familiarize yourself with it. Choose read the emacs manual from the help submenu. C-h i will get you into info which should have documentation for many of the programs on your computer. Move the cursor down to emacs and then press enter. Only a few commands are enough to use info: 'Enter' follows a link' 'u' moves up to a higher level. 'l' goes back to the last place you were at. That should be enough to get started. Bijan