[mew-int 2893] Re: mew-wrap-lines

Christophe TROESTLER <[email protected]> Tue, 20 Jul 2010 23:00:21 +0200 (CEST)
Newsgroups gmane.mail.mew.general
Organization Universite de Mons (http://math.umons.ac.be/an/)
Message-ID <20100720.230021.983585616360598566.Christophe.Troestler@umons.ac.be>
On Mon, 28 Jun 2010 22:34:09 +0200, Christophe TROESTLER wrote:
>
> - For lines starting with a dash, like enumerations, mew-wrap-lines 
>  uses the dash as a prefix to fold lines.
> - When several items follow, this make it impossible to distinguish 
>  them, unless one does not wrap the lines, which is not fun.
>
> Of course, one may have a citation prefix like
>
> > - bla bla...
>
> Is there a way to tell mew to remove the dashes (and maybe "*") fro 
> m filling prefix?  This would be a nice thing to have.

Replying to myself, here is the trick I use:

(defadvice mew-fill-match-adaptive-prefix
   (after mew-remove-itemize-chars)
   "Remove the symbols commonly used as indicators for itemize lists  
from
the prefix used for filling messages."
   (message ad-return-value)
   (setq ad-return-value
	(replace-regexp-in-string "[-*]" " " ad-return-value)))

(add-hook 'mew-init-hook
  (function
   (lambda ()
     (ad-activate 'mew-fill-match-adaptive-prefix))))

Hope it may be pf help to somebody else...

Best,
C.