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

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

bug#7606: Add xhtml to auto-mode-alist


From: Karel Klíč
Subject: bug#7606: 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)





reply via email to

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