aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/sgml-mode.el4
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a63aa192181..130bc61f642 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12010-12-11 Glenn Morris <rgm@gnu.org>
2
3 * textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension.
4
12010-12-11 Karel Klíč <kklic@redhat.com> 52010-12-11 Karel Klíč <kklic@redhat.com>
2 6
3 * files.el (auto-mode-alist): Use html-mode for *.xhtml. (Bug#7606) 7 * files.el (auto-mode-alist): Use html-mode for *.xhtml. (Bug#7606)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 47d2f7a45e0..a525c1a7e2c 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -384,6 +384,9 @@ a DOCTYPE or an XML declaration."
384 (save-excursion 384 (save-excursion
385 (goto-char (point-min)) 385 (goto-char (point-min))
386 (or (string= "xml" (file-name-extension (or buffer-file-name ""))) 386 (or (string= "xml" (file-name-extension (or buffer-file-name "")))
387 ;; Maybe the buffer-size check isn't needed, I don't know.
388 (and (zerop (buffer-size))
389 (string= "xhtml" (file-name-extension (or buffer-file-name ""))))
387 (looking-at "\\s-*<\\?xml") 390 (looking-at "\\s-*<\\?xml")
388 (when (re-search-forward 391 (when (re-search-forward
389 (eval-when-compile 392 (eval-when-compile
@@ -2153,5 +2156,4 @@ Can be used as a value for `html-mode-hook'."
2153 2156
2154(provide 'sgml-mode) 2157(provide 'sgml-mode)
2155 2158
2156;; arch-tag: 9675da94-b7f9-4bda-ad19-73ed7b4fb401
2157;;; sgml-mode.el ends here 2159;;; sgml-mode.el ends here