Make emacs always close html tags

杀马特。学长 韩版系。学妹 提交于 2019-12-05 08:53:05

You need to turn on sgml-xml-mode:

When non-nil, tag insertion functions will be XML-compliant.

sgml-mode attempts to guess whether your buffer is in XHTML (and so turn on sgml-xml-mode automatically) by looking at the doctype. See the function sgml-xml-guess. It's expecting to find the string "XHTML" somewhere in the DTD name.

If you can't get sgml-xml-guess to work, then you could turn on sgml-xml-mode explicitly. Perhaps like this:

(add-hook 'html-mode-hook #'(lambda nil (setq sgml-xml-mode t)))
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!