--- Begin Message ---
Subject: |
Add xhtml to auto-mode-alist |
Date: |
Fri, 10 Dec 2010 11:37:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Files with the .xhtml extension are frequently used to store XHTML
documents. There are reasons why people use .xhtml instead of .html: for
example Firefox treats files with .xhtml extension differently from
files with .html extension. Sometimes Firefox completely fails to
display local XHTML document in .html file.
Emacs should open new files with the .xhtml extension in the html mode,
and not in the fundamental mode.
Please consider the following change.
diff -up ./lisp/files.el.xhtml ./lisp/files.el
--- ./lisp/files.el.xhtml 2010-12-10 11:06:40.372710147 +0100
+++ ./lisp/files.el 2010-12-10 11:06:46.124618115 +0100
@@ -2232,7 +2232,7 @@ since only a single case-insensitive sea
(lambda (elt)
(cons (purecopy (car elt)) (cdr elt)))
`(;; do this first, so that .html.pl is Polish html, not Perl
- ("\\.s?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode)
+ ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode)
("\\.svgz?\\'" . image-mode)
("\\.svgz?\\'" . xml-mode)
("\\.x[bp]m\\'" . image-mode)
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#7606: Add xhtml to auto-mode-alist |
Date: |
Fri, 10 Dec 2010 21:51:05 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Version: 24.1
> Emacs should open new files with the .xhtml extension in the html mode,
> and not in the fundamental mode.
OK; applied, together with an associated change to sgml-xml-guess.
--- End Message ---