From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48472 Path: main.gmane.org!not-for-mail From: Raymond Scholz Newsgroups: gmane.emacs.gnus.general Subject: [patch] deuglify.el - Better highlighting after deuglification Date: Wed, 01 Jan 2003 14:52:35 +0100 Organization: =?UTF-8?Q?/=CB=8C=C9=94=CB=90=C9=A1=C9=99na=C9=AA=CB=88ze=C9=AA=CA=83n/?= Sender: owner-ding@hpc.uh.edu Message-ID: Reply-To: Raymond Scholz NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1041429476 4113 80.91.224.249 (1 Jan 2003 13:57:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 1 Jan 2003 13:57:56 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18TjNa-00014C-00 for ; Wed, 01 Jan 2003 14:57:55 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18TjMt-0001Pm-00; Wed, 01 Jan 2003 07:57:11 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 01 Jan 2003 07:57:17 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id HAA19565 for ; Wed, 1 Jan 2003 07:56:39 -0600 (CST) Original-Received: (qmail 40928 invoked by alias); 1 Jan 2003 13:55:25 -0000 Original-Received: (qmail 40923 invoked from network); 1 Jan 2003 13:55:25 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by 66.230.238.6 with SMTP; 1 Jan 2003 13:55:25 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18TjLx-0006g2-00 for ; Wed, 01 Jan 2003 14:56:13 +0100 Original-To: ding@gnus.org Original-Path: mde1.zonix.de!not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 82 Original-NNTP-Posting-Host: acb99c7c.ipt.aol.com Original-X-Trace: quimby.gnus.org 1041429373 25664 172.185.156.124 (1 Jan 2003 13:56:13 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 1 Jan 2003 13:56:13 GMT X-Now-Playing: Nothing X-Face: %.!RBc`e*wW)84O*\)VdkC}mU5c2Zh$y~ZRA3K594g/jp_&5bx\Oyes!/jK~4<<%KlaPn^\ 0 * deuglify.el (gnus-outlook-rearrange-article): Kill overlays before rearranging the article. Cheers, Ray -- "The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." (Bill Gates from The Road Ahead, p265) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=deuglify.el.patch Index: deuglify.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/deuglify.el,v retrieving revision 6.5 diff -u -r6.5 deuglify.el --- deuglify.el 2002/12/31 17:25:19 6.5 +++ deuglify.el 2003/01/01 13:48:48 @@ -311,17 +311,17 @@ (goto-char (match-beginning 0)))))))))) (defun gnus-outlook-rearrange-article (from-where) - "Put the text from `from-where' to the end of buffer at the top of -the article buffer." + "Put the text from `from-where' to the end of buffer at the top of the article buffer." (save-excursion (let ((inhibit-read-only t) (cite-marks gnus-outlook-deuglify-cite-marks)) (gnus-with-article-buffer - (beginning-of-buffer) - (re-search-forward "^$") - (transpose-regions (point) (- from-where 1) - from-where (point-max) t))))) - + (article-goto-body) + ;; attribution out of place? + (unless (= (point) from-where) + (gnus-kill-all-overlays) + (transpose-regions (point) (+ from-where 1) + (+ from-where 1) (point-max))))))) ;; John Doe wrote in message ;; news:a87usw8$dklsssa$2@some.news.server... @@ -341,6 +341,7 @@ "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\1\\2\\4") (match-beginning 0))))))) @@ -367,6 +368,7 @@ "[^\n]+: [^\n]+$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\1 wrote:") (match-beginning 0))))))) @@ -387,6 +389,7 @@ "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\4 \\5\\6\\7") (match-beginning 0))))))) --=-=-=--