From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: How do you customize a Major Mode? Date: Wed, 14 Jun 2006 10:46:41 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1150278040 7307 80.91.229.2 (14 Jun 2006 09:40:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Jun 2006 09:40:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 14 11:40:38 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 1FqRrW-0004tJ-Pt for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jun 2006 11:40:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FqRrW-000357-Bp for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jun 2006 05:40:34 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-X-Trace: individual.net QMWJouKo+bH+yXHDc43YMADXeHI0YqT1CLXyDFUZyw/tDr59s+ User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:TKutxrnfeJjb/0a8a1btt7McFVU= Original-Xref: shelby.stanford.edu gnu.emacs.help:139831 Original-To: help-gnu-emacs@gnu.org 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:35455 Archived-At: Robert Jeffrey Miesen writes: > I would like to customize how a couple of major mode work (such as CSS > mode and HTML mode (NOT "HTML helper" mode). How would one go about doing > such a thing? It depends on what changes you need to do. A general answer could be "Open html-mod.el and change it", but I won't be that mean... :) Some people just want to change the "syntax hilighting" (font lock in Emacs lingua), some want to change the behavior of some function. Maybe if you describe in more detail what you want to change, people can make suggestions? > Also, how would one set the default major mode for a certain > class of files? This is how I add the sql, ins, cre and upg file extensions to use sql-mode: (setq auto-mode-alist (cons '("\\.\\(sql\\|ins\\|cre\\|upg\\)$" . sql-mode) auto-mode-alist)) /Mathias