problems with derived-mode: setq

Uwe Brauer oub at mat.ucm.es
Wed Mar 24 18:13:09 EDT 2010


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))

 like this 


(the tmp file with the extension .eml so it is
 easy to turn this on.)

Problem is that the keybinding works but the setq is
ignored.

Now the docstring of define-derived-mode tells:


On a more complicated level, the following command uses `sgml-mode' as
the parent, and then sets the variable `case-fold-search' to nil:

  (define-derived-mode article-mode sgml-mode "Article"
    "Major mode for editing technical articles."
    (setq case-fold-search nil))

So I understand setq should work but it does not for me.
Can somebody please enlighten me?

Uwe Brauer 



More information about the XEmacs-Beta mailing list