Hehe! ;-)


Suddenly I wish I was the one that wrote it! 
—
Sent from a pay phone.

On Sat, Mar 29, 2014 at 3:20 PM, Paul Dawson <notifications@github.com>
wrote:

>> @@ -0,0 +1,15 @@
>> +;; Nxml specific function, i.e it only works with nxml.
>> +(defun enc-pretty-print-xml-region (begin end)
>> +  "Pretty format XML markup in region. You need to have nxml-mode
>> +http://www.emacswiki.org/cgi-bin/wiki/NxmlMode installed to do
>> +this.  The function inserts linebreaks to separate tags that have
>> +nothing but whitespace between them.  It then indents the markup
>> +by using nxml's indentation rules."
>> +  (interactive "r")
>> +  (save-excursion
>> +      (nxml-mode)
>> +      (goto-char begin)
>> +      (while (search-forward-regexp "\>[ \\t]*\<" nil t)
>> +        (backward-char) (insert "\n"))
>> +      (indent-region begin end))
>> +    (message "Ah, much better!"))
> I lol'd.
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/bjoska/emacsandcheese/pull/47/files#r11093473