From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40617 Path: main.gmane.org!not-for-mail From: ShengHuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: Default for message-tab-body-function Date: Thu, 29 Nov 2001 11:59:04 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <2ng06xwm1z.fsf@zsh.cs.rochester.edu> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035176139 1889 80.91.224.250 (21 Oct 2002 04:55:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:55:39 +0000 (UTC) Return-Path: Original-Received: (qmail 20120 invoked from network); 29 Nov 2001 17:00:19 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 29 Nov 2001 17:00:19 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 169UXd-00065D-00; Thu, 29 Nov 2001 11:00:05 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 29 Nov 2001 10:59:50 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA07715 for ; Thu, 29 Nov 2001 10:59:39 -0600 (CST) Original-Received: (qmail 20096 invoked by alias); 29 Nov 2001 16:59:49 -0000 Original-Received: (qmail 20091 invoked from network); 29 Nov 2001 16:59:48 -0000 Original-Received: from zsh.cs.rochester.edu (HELO zsh.2y.net) (192.5.53.126) by gnus.org with SMTP; 29 Nov 2001 16:59:48 -0000 Original-Received: (from zsh@localhost) by zsh.2y.net (8.11.6/8.11.2) id fATGx6q15274; Thu, 29 Nov 2001 11:59:06 -0500 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q Mail-Copies-To: never In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Thu, 29 Nov 2001 17:45:25 +0100") Original-Lines: 36 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40617 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40617 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: > Simon Josefsson writes: > >> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: >> >>> I think the default behavior for TAB in the body of a message should >>> be whatever TAB in text-mode does. (Even if the user has changed >>> what TAB in text-mode does.) >>> >>> Is there a way to achieve this, or to come close? >> >> Like this? Message even runs text-mode-hook, so frobing text-mode-map >> from that hook should work using Message as well. > > This of course looks up the key at the time when message.el* is > loaded. So it does not work to do > > (require 'message) > (define-key text-mode-map (kbd "TAB") ...) > > But then, maybe that's not necessary. Maybe your suggestion is good > enough. How about the following code? (defcustom message-tab-body-function nil ...) (defun message-tab () ... (funcall (or (cdar alist) message-tab-body-function (lookup-key text-mode-map "\t"))) ) ShengHuo