Gnus development mailing list
 help / color / mirror / Atom feed
From: Jesper Harder <harder@ifa.au.dk>
Subject: Re: spam-stat.el and mime
Date: Mon, 12 Jan 2004 05:47:47 +0100	[thread overview]
Message-ID: <m3d69pu618.fsf@defun.localdomain> (raw)
In-Reply-To: <87u133g3f4.fsf@andy.bu.edu> (Andrew Cohen's message of "Sat, 10 Jan 2004 11:43:27 -0500")

Andrew Cohen <cohen@andy.bu.edu> writes:

> I've modified it to decode mime (if you don't like this it can be
> controlled by customizing the spam-treat-mime-function to nil).

An often requested feature!  Below a few pedantic comments on the
code:

> + 	  ;; We allow users to glean info from the handles.
> + 	  (when gnus-article-mime-part-function
> + 	    (gnus-mime-part-function handles)))

If someone is using this feature, they probably don't want to run
`gnus-article-mime-part-function' when processing spam.

> +       (if (gnus-buffer-live-p (current-buffer))

(current-buffer) always returns a live buffer, so you don't need this
line.

> + 	  (with-current-buffer (current-buffer)

This line should also be redundant.

> +       (if (and type (let ((case-fold-search t))
> + 		      (string-match "quoted-printable" type)))
> + 	  (progn
> + 	    (article-goto-body)
> + 	    (quoted-printable-decode-region
> + 	     (point) (point-max) (mm-charset-to-coding-system charset)))
> + 	(progn
> + 	  (when (and type (let ((case-fold-search t))

You don't need a progn around the ELSE part of an `if' in Emacs Lisp
(in contrast with Common Lisp).




  parent reply	other threads:[~2004-01-12  4:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-10 16:43 Andrew Cohen
2004-01-11 20:37 ` Adam Sjøgren
2004-01-12  4:47 ` Jesper Harder [this message]
2004-01-12 21:37 ` Ted Zlatanov
2004-01-13 19:42 ` Adam Sjøgren
2004-01-20  5:56 ` Jesper Harder
2004-01-21  0:17   ` Ted Zlatanov
2004-01-21 20:41   ` Adam Sjøgren
2004-01-22  7:30     ` Jesper Harder
2004-01-22 13:49       ` Reiner Steib
2004-01-23  1:15       ` Jesper Harder

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=m3d69pu618.fsf@defun.localdomain \
    --to=harder@ifa.au.dk \
    /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).