From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40143 Path: main.gmane.org!not-for-mail From: Andreas Fuchs Newsgroups: gmane.emacs.gnus.general Subject: Re: header-sensitive beginning-of-line? Date: Fri, 09 Nov 2001 12:08:45 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87g07otsm4.fsf@squeaker.lickey.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/signed ; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: main.gmane.org 1035175737 31628 80.91.224.250 (21 Oct 2002 04:48:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:48:57 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: (qmail 5069 invoked from network); 9 Nov 2001 11:11:13 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 9 Nov 2001 11:11:13 -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 1629Y8-0000dd-00; Fri, 09 Nov 2001 05:10:16 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 09 Nov 2001 05:09:56 -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 FAA03832 for ; Fri, 9 Nov 2001 05:09:41 -0600 (CST) Original-Received: (qmail 5038 invoked by alias); 9 Nov 2001 11:09:51 -0000 Original-Received: (qmail 5033 invoked from network); 9 Nov 2001 11:09:50 -0000 Original-Received: from mail.ycn.com (212.88.160.3) by gnus.org with SMTP; 9 Nov 2001 11:09:50 -0000 Original-Received: from eris.ath.cx (mail@[212.88.187.152]) by mail.ycn.com (8.11.3/8.9.3/Debian 8.9.3-21) with ESMTP id fA9BDVp05455; Fri, 9 Nov 2001 12:13:31 +0100 Original-Received: from asf by eris.ath.cx with local (Exim 3.32 #1 (Debian)) id 1629Wf-0006N3-00; Fri, 09 Nov 2001 12:08:45 +0100 Mail-Copies-To: never Original-To: rutt+news@cis.ohio-state.edu X-Attribution: asf Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40143 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40143 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Transfer-Encoding: quoted-printable On 2001-11-08, Matt Armstrong wrote: > Of course, if point is already at the sweet spot, message-bol should > then go to the real beginning of line. This does what you want (I'm not sure if I duplicated some functionality with message-point-in-header-p, maybe some more experienced gnus hacker can tell me): (defun message-point-in-header-p () (let* ((point-in-header (point)) (body-begin (progn (message-goto-body) (point)))) (prog1 (< point-in-header body-begin) (goto-char point-in-header)))) ; saves the save-excursion overhead (defun message-beginning-of-line (&optional n) (interactive "p") (let ((cur-point (point))) (beginning-of-line n) (when (message-point-in-header-p) (let ((to-point (save-excursion (end-of-line) (re-search-backward "^[^:]*: " nil t) (match-end 0)))) (unless (=3D cur-point to-point) (goto-char to-point)))))) =20=20=20=20=20=20 (define-key message-mode-map "\C-a" 'message-beginning-of-line) Have fun, =2D-=20 Andreas Fuchs, , asf@jabber.at, antifuchs --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE767k9ucDAWATX9F8RAgMsAJ9xylnUDt4I0wqLdqeKR0UU3zHdngCffd0o Kz8SODkWY7ex5ajzOPGSoyA= =zZ3r -----END PGP SIGNATURE----- --==-=-=--