<<< Date Index >>>     <<< Thread Index >>>

Re: xemacs, color, mail headers....



On Thu, Nov 20 2003 at 10:33:42PM BRST, Matt Price <matt.price@xxxxxxxxxxx> 
wrote:

> (setq default-major-mode 'text-mode)
> (add-hook 'text-mode-hook 'turn-on-auto-fill)
> ;; (add-hook 'mail-mode-hook 'mail-text)
> (gnuserv-start)
> 
> 
> ;; associating mutt with one or another mode
> ;; (or (assoc "mutt-" auto-mode-alist) 
> ;;    (setq auto-mode-alist (cons '("mutt-" . mutt-mode) auto-mode-alist))) 
> 
>  (or (assoc "mutt-" auto-mode-alist) 
>     (setq auto-mode-alist (cons '("mutt-" . mail-mode) auto-mode-alist))) 

        At least here, the file xemacs actually edits is something like
"muttasdf", where "asdf" is a random string.

        So you should actually use something like "/mutt*" instead of
"mutt-", above.

        Changing that, mail-mode gets called.

> (add-hook 'mail-mode-hook 'axels-mail-mode-hook)
> 
> 
> ;; modified mail mode from axel -- looks nice
> (defun axels-mail-mode-hook () 
>   (turn-on-auto-fill) ;;; Auto-Fill is necessary for mails 
>   (turn-on-font-lock) ;;; Font-Lock is always cool *g* 

        text-mode-hook gets called before mail-mode-hook, when you enter
mail-mode, so there's no need to turn-on-font-lock twice.

>   (mail-text) ;;; Jumps to the beginning of the mail text 
> ) 

        With the change I suggested above, your code enters mail-mode turn
on auto-fill and font-lock, but doesn't do mail-text. I tried some custom
made functions, but none works. I even tried (forward-lines 10) and
(forward-char-command), and nothing.

        For some reason, the hook won't execute movement functions. Perhaps
it's called before the buffer contents are actually available?



                rbp
-- 
 Rodrigo Bernardo Pimentel                         <rbp@xxxxxxxxxxxx>
 http://isnomore.net                          GPG KeyId: <0x0DB14978>

... And several butcher's aprons.