I set up my emacs to use sgml-mode so that I can format xml with
M-x reformat-xml, but it puts the closing tags on the line below, rather than on the same line.
instead of this:
I want this:
Can I configure
sgml-mode to do this for all reformats?
So far I've just got this to activate
(require 'sgml-mode) (defun reformat-xml () (interactive) (save-excursion (sgml-pretty-print (point-min) (point-max)) (indent-region (point-min) (point-max))))