help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you customize a Major Mode?


From: Mathias Dahl
Subject: Re: How do you customize a Major Mode?
Date: Wed, 14 Jun 2006 10:46:41 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

Robert Jeffrey Miesen <bobby_miesen@yahoo.com> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]