unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* about auto-mode-alist
@ 2007-11-30  1:38 step
  2007-11-30  2:13 ` Billy O'Connor
       [not found] ` <mailman.4329.1196388926.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: step @ 2007-11-30  1:38 UTC (permalink / raw)
  To: help-gnu-emacs

  hi,i use gnu emacs23 ,when i set the auto-mode-alist, it seems don't
work.
  the elisp i add in the my .emacs file follow:
   (setq auto-mode-alist
  (append '(("\\.css\\'"  . css-mode)
            ("\\.c\\'"    . c-mode)
            ("\\.cc\\'"   . c++-mode)
            ("\\.cpp\\'"  . c++-mode)
            ("\\.cxx\\'"  . c++-mode)
            ("\\.hpp\\'"  . c++-mode)
            ("\\.e\\'"    . eiffel-mode)
            ("\\.hxx\\'"  . c++-mode)
            ("\\.h\\'"    . c-mode)
            ("\\.hh\\'"   . c++-mode)
            ("\\.idl\\'"  . c++-mode)
            ("\\.ipp\\'"  . c++-mode)
            ("\\.java\\'" . java-mode)
            ("\\.lua\\'"   . lua-mode)
            ("\\.pl\\'"   . perl-mode)
            ("\\.pm\\'"   . perl-mode)
            ("\\.rb\\'"   . ruby-mode)
            ("\\.rbw\\'"  . ruby-mode)
            ("\\.t2t\\'"  . t2t-mode)
	    ("\\.txt\\'"  . text-mode)
            ("\\.py\\'"   . python-mode)
     	    ("\\.tex\\'"  . LaTeX-mode)
	    ("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode)
	    )
      auto-mode-alist))
   when i use the C-x C-f create a new .xml file ,it can auto load to
nxml-mode ,but if i open a exist .xml file ,it auto load to sgml-mode
which is the default mode emacs set in the file.el .
   is there somebody konw why? thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-11-30  2:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-30  1:38 about auto-mode-alist step
2007-11-30  2:13 ` Billy O'Connor
     [not found] ` <mailman.4329.1196388926.18990.help-gnu-emacs@gnu.org>
2007-11-30  2:25   ` step
2007-11-30  2:38   ` step
2007-11-30  2:41     ` step

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).