# HG changeset patch # User Katsumi Yamaoka # Date 1292460904 0 # Node ID d60eda14e134ffe89b09b18a6118e0ffe19fdabe # Parent 3b8b4f28c7580bd55be7a7fafbec2920e63687b4 shr.el (shr-insert): Set shr-start after deleting trailing space; don't delete it within indentation. diff -r 3b8b4f28c758 -r d60eda14e134 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Wed Dec 15 22:24:36 2010 +0000 +++ b/lisp/gnus/ChangeLog Thu Dec 16 00:55:04 2010 +0000 @@ -1,3 +1,8 @@ +2010-12-16 Katsumi Yamaoka + + * shr.el (shr-insert): Set shr-start after deleting trailing space; + don't delete it within indentation. + 2010-12-15 Lars Magne Ingebrigtsen * nnimap.el (nnimap-retrieve-group-data-early): Fix the syntax of the diff -r 3b8b4f28c758 -r d60eda14e134 lisp/gnus/shr.el --- a/lisp/gnus/shr.el Wed Dec 15 22:24:36 2010 +0000 +++ b/lisp/gnus/shr.el Thu Dec 16 00:55:04 2010 +0000 @@ -253,16 +253,12 @@ (when (and (bolp) (> shr-indentation 0)) (shr-indent)) - ;; The shr-start is a special variable that is used to pass - ;; upwards the first point in the buffer where the text really - ;; starts. - (unless shr-start - (setq shr-start (point))) ;; No space is needed behind a wide character categorized as ;; kinsoku-bol, between characters both categorized as nospace, ;; or at the beginning of a line. (let (prev) - (when (and (eq (preceding-char) ? ) + (when (and (> (current-column) shr-indentation) + (eq (preceding-char) ? ) (or (= (line-beginning-position) (1- (point))) (and (shr-char-breakable-p (setq prev (char-after (- (point) 2)))) @@ -270,6 +266,11 @@ (and (shr-char-nospace-p prev) (shr-char-nospace-p (aref elem 0))))) (delete-char -1))) + ;; The shr-start is a special variable that is used to pass + ;; upwards the first point in the buffer where the text really + ;; starts. + (unless shr-start + (setq shr-start (point))) (insert elem) (let (found) (while (and (> (current-column) shr-width)