Make emacs always close html tags

How can I make emacs always close the sgml tag (CcCt)?

For example, tags div, h2work fine, but por linot. Basically I am looking for a way to indicate that I always use xhtml when inserting a tag.

+5
source share
1 answer

You need to enable sgml-xml-mode:

If non-nil, the tag insertion functions will be XML compatible.

sgml-modetrying to guess if your buffer is in XHTML (and therefore automatically turn it on sgml-xml-mode) by looking at doctype. See Function sgml-xml-guess. He expects to find a string "XHTML"somewhere in the DTD name.

sgml-xml-guess , sgml-xml-mode . , :

(add-hook 'html-mode-hook #'(lambda nil (setq sgml-xml-mode t)))
+6

All Articles