changeset 111877:8d22a439225b

* lisp/textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension.
author Glenn Morris <rgm@gnu.org>
date Fri, 10 Dec 2010 18:50:58 -0800
parents 297fa92ba5bf
children 4b2ef298966a
files lisp/ChangeLog lisp/textmodes/sgml-mode.el
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Dec 10 18:48:23 2010 -0800
+++ b/lisp/ChangeLog	Fri Dec 10 18:50:58 2010 -0800
@@ -1,3 +1,7 @@
+2010-12-11  Glenn Morris  <rgm@gnu.org>
+
+	* textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension.
+
 2010-12-11  Karel Klíč  <kklic@redhat.com>
 
 	* files.el (auto-mode-alist): Use html-mode for *.xhtml.  (Bug#7606)
--- a/lisp/textmodes/sgml-mode.el	Fri Dec 10 18:48:23 2010 -0800
+++ b/lisp/textmodes/sgml-mode.el	Fri Dec 10 18:50:58 2010 -0800
@@ -384,6 +384,9 @@
   (save-excursion
     (goto-char (point-min))
     (or (string= "xml" (file-name-extension (or buffer-file-name "")))
+        ;; Maybe the buffer-size check isn't needed, I don't know.
+        (and (zerop (buffer-size))
+             (string= "xhtml" (file-name-extension (or buffer-file-name ""))))
 	(looking-at "\\s-*<\\?xml")
 	(when (re-search-forward
 	       (eval-when-compile
@@ -2153,5 +2156,4 @@
 
 (provide 'sgml-mode)
 
-;; arch-tag: 9675da94-b7f9-4bda-ad19-73ed7b4fb401
 ;;; sgml-mode.el ends here