diff options
| author | Glenn Morris | 2010-12-10 18:50:58 -0800 |
|---|---|---|
| committer | Glenn Morris | 2010-12-10 18:50:58 -0800 |
| commit | 6961d41cfbf7256ecd1f1b7befe59cf635deb73b (patch) | |
| tree | a4fd50fe7e10ec7e9741eb71f69f196ca62f2980 | |
| parent | 1e5d2a048d4c76ba4aa0c86f7393297b0d3cd373 (diff) | |
| download | emacs-6961d41cfbf7256ecd1f1b7befe59cf635deb73b.tar.gz emacs-6961d41cfbf7256ecd1f1b7befe59cf635deb73b.zip | |
* lisp/textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/textmodes/sgml-mode.el | 4 |
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 @@ | |||
| 1 | 2010-12-11 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension. | ||
| 4 | |||
| 1 | 2010-12-11 Karel Klíč <kklic@redhat.com> | 5 | 2010-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 |