Gnus development mailing list
 help / color / mirror / Atom feed
From: sigurd@12move.de (Karl Pflästerer)
Subject: Re: Missing washing function
Date: Wed, 29 Oct 2003 02:50:00 +0100	[thread overview]
Message-ID: <m3znfkg6jv.fsf@hamster.pflaesterer.de> (raw)
In-Reply-To: <m3ptghxbre.fsf@defun.localdomain>

On 28 Oct 2003, Jesper Harder <- harder@ifa.au.dk wrote:

> sigurd@12move.de (Karl Pflästerer) writes:

>> (defun gnus-article-fill-flowed ()
>>   (interactive)
>>   (save-excursion
>>     (set-buffer gnus-article-buffer)
>>     (save-restriction
>>       (let ((buffer-read-only nil))
>> 	(gnus-narrow-to-body)
>> 	(fill-flowed)))))

> I'm just nit-picking, but I think `with-current-buffer' is slightly
> cleaner than `save-excursion':

> (defun gnus-article-fill-flowed ()
>   (interactive)
>   (with-current-buffer gnus-article-buffer
>     (save-restriction
>       (let ((buffer-read-only nil))
> 	(gnus-narrow-to-body)
> 	(fill-flowed)))))

You are clearly right.  Or perhaps even better:

(defun gnus-article-fill-flowed ()
  (interactive)
  (gnus-with-article-buffer
    (save-restriction
      (gnus-narrow-to-body)
      (fill-flowed))))

[best would be to add a doctsring :-)]


   KP

-- 
      And has thou slain the Jabberwock?
          Come to my arms, my beamish boy!
      O frabjous day!  Callooh!  Callay!'
          He chortled in his joy.   "Lewis Carroll" "Jabberwocky"



  reply	other threads:[~2003-10-29  1:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-25 17:43 Karl Eichwalder
2003-10-28  0:51 ` Karl Pflästerer
2003-10-28 19:30   ` Karl Eichwalder
2003-10-28 20:58     ` Karl Pflästerer
2003-10-28 22:01       ` Jesper Harder
2003-10-29  1:50         ` Karl Pflästerer [this message]
2003-10-30 19:52           ` Karl Eichwalder

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=m3znfkg6jv.fsf@hamster.pflaesterer.de \
    --to=sigurd@12move.de \
    /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).