problems with derived-mode: setq

Ben Wing ben at 666.com
Fri Mar 26 03:47:02 EDT 2010


On Wed, Mar 24, 2010 at 5:13 PM, Uwe Brauer <oub at mat.ucm.es> wrote:
> Hello
>
> >From time to time especially for slow connections I can't
> use gnus but have to rely on
> thunderbird/seamonkey. Fortunately a plugin called external
> editor allows me to use xemacs via gnuclient.
>
> The only problem is that the temporal file created by
> that plugin looks like
>
> --8<------------------------schnipp------------------------->8---
> Subject:   Re: Fw: sustitucion
> To:        Uwe Brauer <oub at mat.ucm.es>
> Cc:
> Bcc:
> Reply-To:
> -=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-
>
> Hello
>
>
>
> --8<------------------------schnapp------------------------->8---
>
> The problem  is auto-fill function, since it does not use
> do-auto-fill but message-do-auto-fill which depends on the
> message mail-header-separator.
>
> So I thought of using
> (define-derived-mode my-message-mode message-mode
>  "My-Message-Mode"
>  (local-set-key "\C-c\C-c" 'gnuserv-edit)
>  (local-set-key "\C-c\C-a" 'my-set-auto-fill)
>  (local-set-key "\C-c\C-s" 'my-toggle-mail-separator)
>   (setq  mail-header-separator "--text follows this line--")
>  (setq auto-fill-function 'do-auto-fill))

Strange ...  maybe something else is setting auto-fill-function
afterwards.  What value does it have?

BTW if you're curious how a macro like `define-derived-mode' works,
put the cursor on the left paren just before (define-derived-mode ...)
and do M-x macroexpand-sexp.  This tells you what the macro expands
to.

ben



More information about the XEmacs-Beta mailing list