From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: keywords highlighting Date: Tue, 7 Feb 2006 14:56:25 -0900 Message-ID: <20060207235625.GL1767@johnsons-web.com> References: <87u0bbhssj.fsf@utero.home> <1139345272.491088.302860@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139356155 26757 80.91.229.2 (7 Feb 2006 23:49:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2006 23:49:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 08 00:49:09 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 1F6ca4-0006qH-69 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Feb 2006 00:49:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6ca3-0001hX-LX for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Feb 2006 18:49:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F6cZo-0001h5-FR for help-gnu-emacs@gnu.org; Tue, 07 Feb 2006 18:48:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F6cZm-0001gS-Os for help-gnu-emacs@gnu.org; Tue, 07 Feb 2006 18:48:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F6cZm-0001gM-Iq for help-gnu-emacs@gnu.org; Tue, 07 Feb 2006 18:48:50 -0500 Original-Received: from [208.218.214.44] (helo=ns3.cniweb.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F6ccx-0007PS-Qi for help-gnu-emacs@gnu.org; Tue, 07 Feb 2006 18:52:08 -0500 Original-Received: from linus.johnson.com (rdbck-static-445.palmer.mtaonline.net [64.4.232.191]) by ns3.cniweb.net (8.13.5/8.13.5) with ESMTP id k17NlYC0003428 for ; Tue, 7 Feb 2006 18:47:35 -0500 (EST) Original-Received: from linus.johnson.com (localhost.johnson.com [127.0.0.1]) by linus.johnson.com (8.12.8/8.12.8) with ESMTP id k17NuPOV025317 for ; Tue, 7 Feb 2006 14:56:25 -0900 Original-Received: (from tim@localhost) by linus.johnson.com (8.12.8/8.12.8/Submit) id k17NuPIm025315 for help-gnu-emacs@gnu.org; Tue, 7 Feb 2006 14:56:25 -0900 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Tim Johnson , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <1139345272.491088.302860@g44g2000cwa.googlegroups.com> User-Agent: Mutt/1.4.2.1i 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:33061 Archived-At: * albrns [060207 11:59]: > > kuvkir hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii :-) I think someone is having fun with Kirill (I use both vim and emacs) Kirill, I recommend that you do an appropos search on "font" "font-lock", etc. As in C-h, a, "font-lock". More advanced users can tell you what file extensions that emacs "knows about automatically", in my case: here is an example from my .emacs file: ;; python mode =================================================== (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) (autoload 'python-mode "python-mode" "Turn on Python mode" t) (add-hook 'python-mode-hook 'turn-on-font-lock) ;; and of course that is for python. ;; similarly, for javascript and rebol: ;; javascript mode (add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode)) (autoload 'javascript-mode "javascript-mode" "Turn on Javascript mode" t) (add-hook 'javascript-mode-hook 'turn-on-font-lock) ;; rebol mode ==================================================== (add-to-list 'auto-mode-alist '("\\.r\\'" . rebol-mode)) (autoload 'rebol-mode "rebol-mode" "Turn on REBOL mode" t) (add-hook 'rebol-mode-hook 'turn-on-font-lock) the 'add-hook form tells emacs what functions to add to which mode. In these cases, you see it used for each mode to add 'turn-on-font-lock. Try C-h, f "turn-on-font-lock" I hope this gets you started. cheers tim -- Tim Johnson http://www.alaska-internet-solutions.com