[Top][All Lists]

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

Patch for sgml-mode.el

From: Martin Pohlack
Subject: Patch for sgml-mode.el
Date: Thu, 22 Nov 2007 14:00:07 +0100
User-agent: Thunderbird (X11/20071115)


sgml-mode.el currently contains such lines:

(define-derived-mode sgml-mode text-mode '(sgml-xml-mode "XML" "SGML")


(define-derived-mode html-mode sgml-mode '(sgml-xml-mode "XHTML" "HTML")

This violates that the third argument of define-derived-mode shall be a
string.  Furthermore, it results in "mode-name" not being a string for
html buffers.

The attached small patch against current CVS fixes these problems.

Martin Pohlack

--- sgml-mode.el        2007-11-22 13:52:32.000000000 +0100
+++ /usr/share/emacs/23.0.60/lisp/textmodes/sgml-mode.el        2007-11-22 
13:50:10.000000000 +0100
@@ -408,7 +406,7 @@
         (eq (char-before) ?<))))
-(define-derived-mode sgml-mode text-mode '(sgml-xml-mode "XML" "SGML")
+(define-derived-mode sgml-mode text-mode (if sgml-xml-mode '"XML" '"SGML")
   "Major mode for editing SGML documents.
 Makes > match <.
 Keys <, &, SPC within <>, \", / and ' can be electric depending on
@@ -1890,7 +1888,7 @@
-(define-derived-mode html-mode sgml-mode '(sgml-xml-mode "XHTML" "HTML")
+(define-derived-mode html-mode sgml-mode (if sgml-xml-mode '"XHTML" '"HTML")
   "Major mode based on SGML mode for editing HTML documents.
 This allows inserting skeleton constructs used in hypertext documents with
 completion.  See below for an introduction to HTML.  Use

reply via email to

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