From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/71080 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] Replace subst-char-in-region by subst-char-in-region Date: Sun, 19 Sep 2010 14:46:10 +0200 Message-ID: <1284900370-6551-1-git-send-email-julien@danjou.info> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1284900414 6206 80.91.229.12 (19 Sep 2010 12:46:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 19 Sep 2010 12:46:54 +0000 (UTC) Cc: Julien Danjou To: ding@gnus.org Original-X-From: ding-owner+M19453@lists.math.uh.edu Sun Sep 19 14:46:53 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OxJIC-0001NZ-Us for ding-account@gmane.org; Sun, 19 Sep 2010 14:46:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1OxJI8-0007dk-LW; Sun, 19 Sep 2010 07:46:48 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1OxJI6-0007dT-LU for ding@lists.math.uh.edu; Sun, 19 Sep 2010 07:46:46 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1OxJI5-00071Q-I3 for ding@lists.math.uh.edu; Sun, 19 Sep 2010 07:46:46 -0500 Original-Received: from prometheus.naquadah.org ([212.85.154.174] helo=mx1.naquadah.org) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1OxJI4-0001JB-00 for ; Sun, 19 Sep 2010 14:46:44 +0200 Original-Received: by mx1.naquadah.org (Postfix, from userid 8) id DFAD25C14A; Sun, 19 Sep 2010 14:46:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on prometheus.naquadah.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=4.5 tests=ALL_TRUSTED,BAYES_00, URIBL_RHS_DOB autolearn=no version=3.3.1 Original-Received: from keller.adm.naquadah.org (unknown [IPv6:2a01:e35:2e39:e900:222:faff:fe9d:ce44]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id DB0B05C10B; Sun, 19 Sep 2010 14:46:11 +0200 (CEST) Original-Received: from jd by keller.adm.naquadah.org with local (Exim 4.72) (envelope-from ) id 1OxJHX-0001i9-AQ; Sun, 19 Sep 2010 14:46:11 +0200 X-Mailer: git-send-email 1.7.1 X-Spam-Score: -0.4 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:71080 Archived-At: * 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 --- 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 + * 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