unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mathias Dahl <brakjoller@gmail.com>
Subject: Re: How do you customize a Major Mode?
Date: Wed, 14 Jun 2006 10:46:41 +0200	[thread overview]
Message-ID: <uwtbk3z0u.fsf@gmail.com> (raw)
In-Reply-To: mailman.2866.1150266092.9609.help-gnu-emacs@gnu.org

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	other threads:[~2006-06-14  8:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2866.1150266092.9609.help-gnu-emacs@gnu.org>
2006-06-14  8:46 ` Mathias Dahl [this message]
2006-06-14  6:22 How do you customize a Major Mode? Robert Jeffrey Miesen
2006-06-14 16:00 ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uwtbk3z0u.fsf@gmail.com \
    --to=brakjoller@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).