Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] Replace subst-char-in-region by subst-char-in-region
@ 2010-09-19 12:46 Julien Danjou
  2010-09-19 13:05 ` Lars Magne Ingebrigtsen
  2010-09-20  6:50 ` Reiner Steib
  0 siblings, 2 replies; 25+ messages in thread
From: Julien Danjou @ 2010-09-19 12:46 UTC (permalink / raw)
  To: ding; +Cc: Julien Danjou

* 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




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-09-21 17:02 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-19 12:46 [PATCH] Replace subst-char-in-region by subst-char-in-region Julien Danjou
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

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).