From: Katsumi Yamaoka Date: Thu, 16 Dec 2010 00:55:04 +0000 (+0000) Subject: shr.el (shr-insert): Set shr-start after deleting trailing space; don't delete it... X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~278^2~102 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=48ba8195646031e4e35635c2cff5f2aaf4585550;p=emacs.git shr.el (shr-insert): Set shr-start after deleting trailing space; don't delete it within indentation. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e416abf6d77..76565b3f19f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -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 --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 692d1262348..1e95ddee8cb 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -253,16 +253,12 @@ redirects somewhere else." (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 @@ redirects somewhere else." (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)