From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Colascione <danc@merrillprint.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] xml-escape-region
Date: Wed, 07 Oct 2009 18:10:20 -0400 [thread overview]
Message-ID: <jwv7hv6voyy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200910071456.31966.danc@merrillprint.com> (Daniel Colascione's message of "Wed, 7 Oct 2009 14:56:31 -0400")
> +;;;##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
next prev parent reply other threads:[~2009-10-07 22:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 18:56 [PATCH] xml-escape-region Daniel Colascione
2009-10-07 22:10 ` Stefan Monnier [this message]
2009-10-08 2:13 ` Daniel Colascione
2009-10-08 5:29 ` Stefan Monnier
2009-10-08 6:01 ` Daniel Colascione
2009-10-08 6:03 ` Daniel Colascione
2009-10-09 19:11 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv7hv6voyy.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=danc@merrillprint.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.