From: Julien Danjou <julien@danjou.info>
To: ding@gnus.org
Cc: Julien Danjou <julien@danjou.info>
Subject: [PATCH] Replace subst-char-in-region by subst-char-in-region
Date: Sun, 19 Sep 2010 14:46:10 +0200 [thread overview]
Message-ID: <1284900370-6551-1-git-send-email-julien@danjou.info> (raw)
* gnus-sum.el (gnus-summary-update-mark): Use `subst-char-in-string'
rather than `subst-char-in-region' in order to be able to replace ASCII
char by UTF-8 ones.
Signed-off-by: Julien Danjou <julien@danjou.info>
---
lisp/ChangeLog | 4 ++++
lisp/gnus-sum.el | 6 +++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5d45055..78b196d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -26,6 +26,10 @@
2010-09-19 Julien Danjou <julien@danjou.info>
+ * gnus-sum.el (gnus-summary-update-mark): Use `subst-char-in-string'
+ rather than `subst-char-in-region' in order to be able to replace ASCII
+ char by UTF-8 ones.
+
* gnus-html.el (gnus-html-prefetch-images): Use `url-retrieve' rather
than curl.
(gnus-html-image-fetched): Fix `gnus-html-put-image' call not setting
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index e09c3a5..c35cb25 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -10768,7 +10768,11 @@ If NO-EXPIRE, auto-expiry will be inhibited."
;; Go to the right position on the line.
(goto-char (+ forward (point)))
;; Replace the old mark with the new mark.
- (subst-char-in-region (point) (1+ (point)) (char-after) mark)
+ (let ((to-insert
+ (subst-char-in-string (char-after) mark
+ (buffer-substring (point) (1+ (point))))))
+ (delete-region (point) (1+ (point)))
+ (insert to-insert))
;; Optionally update the marks by some user rule.
(when (eq type 'unread)
(gnus-data-set-mark
--
1.7.1
next reply other threads:[~2010-09-19 12:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-19 12:46 Julien Danjou [this message]
2010-09-19 13:05 ` Lars Magne Ingebrigtsen
2010-09-19 13:42 ` Julien Danjou
2010-09-19 13:45 ` Lars Magne Ingebrigtsen
2010-09-19 13:54 ` Julien Danjou
2010-09-19 14:05 ` Lars Magne Ingebrigtsen
2010-09-19 14:24 ` Julien Danjou
2010-09-19 14:57 ` Lars Magne Ingebrigtsen
2010-09-20 6:50 ` Reiner Steib
2010-09-20 8:11 ` Lars Magne Ingebrigtsen
2010-09-20 8:41 ` Julien Danjou
2010-09-20 8:40 ` Julien Danjou
2010-09-20 9:02 ` Frank Schmitt
2010-09-20 9:29 ` Tassilo Horn
2010-09-20 14:46 ` Ted Zlatanov
2010-09-20 14:57 ` Julien Danjou
2010-09-20 15:17 ` Ted Zlatanov
2010-09-20 17:06 ` Julien Danjou
2010-09-20 17:21 ` Lars Magne Ingebrigtsen
2010-09-20 18:05 ` Ted Zlatanov
2010-09-20 21:41 ` Lars Magne Ingebrigtsen
2010-09-21 8:03 ` Julien Danjou
2010-09-21 16:15 ` Ted Zlatanov
2010-09-21 16:22 ` Lars Magne Ingebrigtsen
2010-09-21 17:02 ` Ted Zlatanov
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=1284900370-6551-1-git-send-email-julien@danjou.info \
--to=julien@danjou.info \
--cc=ding@gnus.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).