From xemacs-m  Wed Apr  2 15:18:15 1997
Received: from newman (root@newman.aventail.com [199.238.236.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id PAA25991
	for <xemacs-beta@xemacs.org>; Wed, 2 Apr 1997 15:18:14 -0600 (CST)
Received: from kramer.in.aventail.com.aventail.com (wmperry@kramer [192.168.1.12]) by newman (8.6.12/8.6.9) with SMTP id MAA20582; Wed, 2 Apr 1997 12:45:26 -0800
Date: Wed, 2 Apr 1997 12:45:26 -0800
Message-Id: <199704022045.MAA20582@newman>
From: "William M. Perry" <wmperry@aventail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Kyle Jones <kyle_jones@wonderworks.com>
Cc: xemacs-beta@xemacs.org
Subject: Re: mail mode nit
In-Reply-To: <QQcjop16442.199704021947@crystal.WonderWorks.COM>
References: <E0wCVFF-0000sf-00@neal.ctd.comsat.com>
	<199704021829.KAA18549@newman>
	<QQcjop16442.199704021947@crystal.WonderWorks.COM>
X-Mailer: VM 6.22 under 19.15 XEmacs Lucid
Errors-to: wmperry@aventail.com
Reply-to: wmperry@aventail.com
X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7</SYF`{vYQ(&RI1&EiH[FvT;J}@f!4kfz
 x_!Y#=y{Uuj9GvUi=cPuajQ(Z42R[wE@{G,sn$qGr5g/wnb*"*ktI+,CD}1Z'wxrM2ag-r0p5I6\nA
 [WJopW_J.WY;

Kyle Jones writes:
>William M. Perry writes:
> > Neal Becker writes:
> > >Wouldn't it be nice if TAB moved to the next field in mail mode?  Sort 
> > >of like traversing entries in a window system.
> > 
> >   you would of course have to deal with every time the user hit tab, seeing
> > if they were above or below mail-header-separator.  Other than that, I'd
> > say go for it.
>
>"How hard could it be?", I thought.  It's nice to do micro project
>in the midst of the usual "what is INN/innfeed/sendmail/ftpd/uucico
>doing to me now??"

  I had to make one change to the regexp in looking-at, like so:

(defun mail-mode-smart-tab ()
  (interactive)
  (let ((text-start (save-excursion (mail-text) (point))))
    (if (>= (point) text-start)
	(tab-to-tab-stop)
      (if (re-search-forward "^[^ \t]" text-start t)
	  (if (looking-at "[^:\n]+: ?")     ; added \n
	      (goto-char (match-end 0))
	    (mail-text))
	(mail-text)))))

Otherwise my signature would cause a tab at the last header line to jump to
the ':' in the URL.

-Bill P.
-- 
William Perry			wmperry@aventail.com
Unix Server Development Lead  & Emacs-W3 Author
Aventail, Corp.			http://www.aventail.com

