From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: C-a in message.el with point between bol and : Date: Tue, 18 Jan 2005 13:59:30 -0500 Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106074926 22877 80.91.229.6 (18 Jan 2005 19:02:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Jan 2005 19:02:06 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 18 20:01:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cqyby-0000Ep-00 for ; Tue, 18 Jan 2005 20:01:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cqynt-0001TD-Li for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2005 14:14:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cqymf-0000vY-VL for emacs-devel@gnu.org; Tue, 18 Jan 2005 14:12:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CqymZ-0000sE-Kc for emacs-devel@gnu.org; Tue, 18 Jan 2005 14:12:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CqymZ-0000s5-Hh for emacs-devel@gnu.org; Tue, 18 Jan 2005 14:12:51 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CqyaF-00065I-CQ for emacs-devel@gnu.org; Tue, 18 Jan 2005 14:00:07 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 2248B8282A7; Tue, 18 Jan 2005 14:00:07 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 198414AC206; Tue, 18 Jan 2005 13:59:31 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 06B504BB62; Tue, 18 Jan 2005 13:59:30 -0500 (EST) Original-To: emacs-devel@gnu.org, bugs@gnus.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.748, requis 5, AWL 0.15, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32344 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32344 When point is inside a header-field name (i.e. inside the header, somewhere betwen the beginningof a line and the beginning of a header field value), message-beginning-of-line moves *forward* to the beginning of the header field's value. I find that counter intuitive and would prefer it to always move backward (except when repeated, obviously). I.e. I suggest the patch below (against the current Emacs-CVS trunk). Stefan --- orig/lisp/gnus/message.el +++ mod/lisp/gnus/message.el @@ -1,5 +1,5 @@ ;;; message.el --- composing mail and news messages -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -800,7 +800,7 @@ ;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138 (defcustom message-generate-headers-first '(references) "Which headers should be generated before starting to compose a message. -If `t', generate all required headers. This can also be a list of headers to +If t, generate all required headers. This can also be a list of headers to generate. The variables `message-required-news-headers' and `message-required-mail-headers' specify which headers to generate. @@ -5282,7 +5282,7 @@ (defcustom message-beginning-of-line t "Whether \\\\[message-beginning-of-line]\ - goes to beginning of header values." +goes to beginning of header values." :version "21.4" :group 'message-buffers :link '(custom-manual "(message)Movement") @@ -5297,10 +5297,10 @@ is nil. If point is in the message header and on a (non-continued) header -line, move point to the beginning of the header value. If point -is already there, move point to beginning of line. Therefore, -repeated calls will toggle point between beginning of field and -beginning of line." +line, move point to the beginning of the header value or the beginning of line, +whichever is closer. If point is already at beginning of line, move point to +beginning of header value. Therefore, repeated calls will toggle point +between beginning of field and beginning of line." (interactive "p") (let ((zrs 'zmacs-region-stays)) (when (and (interactive-p) (boundp zrs)) @@ -5311,9 +5311,9 @@ (bol (progn (beginning-of-line n) (point))) (eol (gnus-point-at-eol)) (eoh (re-search-forward ": *" eol t))) - (if (or (not eoh) (equal here eoh)) - (goto-char bol) - (goto-char eoh))) + (goto-char + (if (and eoh (or (< eoh here) (= bol here))) + eoh bol))) (beginning-of-line n))) (defun message-buffer-name (type &optional to group) @@ -6881,5 +6881,5 @@ ;; coding: iso-8859-1 ;; End: -;;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 +;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 ;;; message.el ends here