all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <danc@merrillprint.com>
To: emacs-devel@gnu.org
Subject: [PATCH] xml-escape-region
Date: Wed, 7 Oct 2009 14:56:31 -0400	[thread overview]
Message-ID: <200910071456.31966.danc@merrillprint.com> (raw)

Index: xml.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/xml.el,v
retrieving revision 1.64
diff -u -r1.64 xml.el
--- xml.el	5 Jan 2009 03:19:57 -0000	1.64
+++ xml.el	7 Oct 2009 18:56:08 -0000
@@ -852,6 +852,13 @@
              ;; grabbing the string works here.
              string ""))
 
+;;;##autoload
+(defun xml-escape-region (beg end)
+  (interactive "*r")
+  (let ((escaped (xml-escape-string (buffer-substring beg end))))
+    (delete-region beg end)
+    (insert escaped)))
+
 (defun xml-debug-print-internal (xml indent-string)
   "Outputs the XML tree in the current buffer.
 The first line is indented with INDENT-STRING."





             reply	other threads:[~2009-10-07 18:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 18:56 Daniel Colascione [this message]
2009-10-07 22:10 ` [PATCH] xml-escape-region Stefan Monnier
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=200910071456.31966.danc@merrillprint.com \
    --to=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.