From cdd3286fd319365ec6d0819a0d1b84174034cc18 Mon Sep 17 00:00:00 2001 From: Dave Goldberg Date: Wed, 20 Nov 2013 04:25:37 +0000 Subject: [PATCH] lisp/gnus/message.el (message-beginning-of-line): Use beginning-of-visual-line when visual-line-mode is turned on --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/message.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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." -- 2.39.2