[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xml-escape-region
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] xml-escape-region |
Date: |
Wed, 07 Oct 2009 18:10:20 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> +;;;##autoload
> +(defun xml-escape-region (beg end)
> + (interactive "*r")
> + (let ((escaped (xml-escape-string (buffer-substring beg end))))
> + (delete-region beg end)
> + (insert escaped)))
I'd rather not autoload such a function. But more importantly, this
implementation is very inefficient. xml-escape-string itself is rather
inefficient except for short strings; this is OK for its current uses,
but for xml-escape-region it's definitely not good (i.e. only usable for
small regions).
Stefan