From: Dave Goldberg Date: Wed, 20 Nov 2013 04:25:37 +0000 (+0000) Subject: lisp/gnus/message.el (message-beginning-of-line): Use beginning-of-visual-line when... X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~776 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cdd3286fd319365ec6d0819a0d1b84174034cc18;p=emacs.git lisp/gnus/message.el (message-beginning-of-line): Use beginning-of-visual-line when visual-line-mode is turned on --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9a6ea149753..fceeeb2bd23 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-11-20 Dave Goldberg + + * message.el (message-beginning-of-line): + Use beginning-of-visual-line when visual-line-mode is turned on. + 2013-11-15 Jan Tatarik * gnus-icalendar.el (gnus-icalendar-event->gnus-calendar) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index a458b3fc25b..b7d0ada35d5 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -6271,6 +6271,9 @@ they are." :link '(custom-manual "(message)Movement") :type 'boolean) +(defvar visual-line-mode) +(declare-function beginning-of-visual-line "simple" (&optional n)) + (defun message-beginning-of-line (&optional n) "Move point to beginning of header value or to beginning of line. The prefix argument N is passed directly to `beginning-of-line'. @@ -6297,7 +6300,9 @@ between beginning of field and beginning of line." (goto-char (if (and eoh (or (< eoh here) (= bol here))) eoh bol))) - (beginning-of-line n))) + (if (and (boundp 'visual-line-mode) visual-line-mode) + (beginning-of-visual-line n) + (beginning-of-line n)))) (defun message-buffer-name (type &optional to group) "Return a new (unique) buffer name based on TYPE and TO."