Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Re: suggestion: don't treat ">From " as quote
Date: Tue, 22 Jun 2004 20:31:10 +0900	[thread overview]
Message-ID: <b9ybrjbvngh.fsf@jpl.org> (raw)
In-Reply-To: <quack.20040622T0123.j5fz8oq9vt@hkn.eecs.berkeley.edu>

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

>>>>> In <quack.20040622T0123.j5fz8oq9vt@hkn.eecs.berkeley.edu>
>>>>>	Karl Chen <quarl@nospam.quarl.org> wrote:

>     Katsumi> (push '("^\\([Ff][Rr][Oo][Mm]\\) " 1 'mode-line)
>     Katsumi>       message-font-lock-keywords)

> Nope, doesn't work :(

> The color is still citation color, but more importantly, I have
> `gnus-cite-hide-percentage' and `gnus-cite-hide-absolute' set so
> they are still hidden.

> The only change seems to be when /typing/ messages, not reading
> articles.

I probably saw what should be improved.  How about the following
patch?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 986 bytes --]

--- gnus-5.10.6/lisp/gnus-cite.el~	2003-05-10 20:58:01 +0000
+++ gnus-5.10.6/lisp/gnus-cite.el	2004-06-22 11:27:41 +0000
@@ -741,13 +741,16 @@
 	(setq end (+ begin gnus-cite-max-prefix)))
       (while (re-search-forward prefix-regexp (1- end) t)
 	;; Each prefix.
-	(setq end (match-end 0)
-	      prefix (buffer-substring begin end))
-	(gnus-set-text-properties 0 (length prefix) nil prefix)
-	(setq entry (assoc prefix alist))
-	(if entry
-	    (setcdr entry (cons line (cdr entry)))
-	  (push (list prefix line) alist))
+	(setq end (match-end 0))
+	(unless (string-match "\\`>from "
+			      (buffer-substring (gnus-point-at-bol)
+						(gnus-point-at-eol)))
+	  (setq prefix (buffer-substring begin end))
+	  (gnus-set-text-properties 0 (length prefix) nil prefix)
+	  (setq entry (assoc prefix alist))
+	  (if entry
+	      (setcdr entry (cons line (cdr entry)))
+	    (push (list prefix line) alist)))
 	(goto-char begin))
       (goto-char start)
       (setq line (1+ line)))

  reply	other threads:[~2004-06-22 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-20 19:13 Karl Chen
2004-06-21 10:12 ` Katsumi Yamaoka
2004-06-22  8:23   ` Karl Chen
2004-06-22 11:31     ` Katsumi Yamaoka [this message]
2004-06-23  9:14       ` Karl Chen
2004-06-23  9:59         ` Katsumi Yamaoka
2004-06-23 14:08           ` Reiner Steib
2004-06-23 14:23             ` Katsumi Yamaoka

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=b9ybrjbvngh.fsf@jpl.org \
    --to=yamaoka@jpl.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).