aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2010-12-16 00:55:04 +0000
committerKatsumi Yamaoka2010-12-16 00:55:04 +0000
commit48ba8195646031e4e35635c2cff5f2aaf4585550 (patch)
tree5a550b4200de7d6bdb3d367d568d038983d12c41
parent156e3f9ca9d668ac781d48e9f6f5d4d5fd7e4a0b (diff)
downloademacs-48ba8195646031e4e35635c2cff5f2aaf4585550.tar.gz
emacs-48ba8195646031e4e35635c2cff5f2aaf4585550.zip
shr.el (shr-insert): Set shr-start after deleting trailing space; don't delete it within indentation.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/shr.el13
2 files changed, 12 insertions, 6 deletions
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 @@
12010-12-16 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * shr.el (shr-insert): Set shr-start after deleting trailing space;
4 don't delete it within indentation.
5
12010-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org> 62010-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * nnimap.el (nnimap-retrieve-group-data-early): Fix the syntax of the 8 * 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."
253 (when (and (bolp) 253 (when (and (bolp)
254 (> shr-indentation 0)) 254 (> shr-indentation 0))
255 (shr-indent)) 255 (shr-indent))
256 ;; The shr-start is a special variable that is used to pass
257 ;; upwards the first point in the buffer where the text really
258 ;; starts.
259 (unless shr-start
260 (setq shr-start (point)))
261 ;; No space is needed behind a wide character categorized as 256 ;; No space is needed behind a wide character categorized as
262 ;; kinsoku-bol, between characters both categorized as nospace, 257 ;; kinsoku-bol, between characters both categorized as nospace,
263 ;; or at the beginning of a line. 258 ;; or at the beginning of a line.
264 (let (prev) 259 (let (prev)
265 (when (and (eq (preceding-char) ? ) 260 (when (and (> (current-column) shr-indentation)
261 (eq (preceding-char) ? )
266 (or (= (line-beginning-position) (1- (point))) 262 (or (= (line-beginning-position) (1- (point)))
267 (and (shr-char-breakable-p 263 (and (shr-char-breakable-p
268 (setq prev (char-after (- (point) 2)))) 264 (setq prev (char-after (- (point) 2))))
@@ -270,6 +266,11 @@ redirects somewhere else."
270 (and (shr-char-nospace-p prev) 266 (and (shr-char-nospace-p prev)
271 (shr-char-nospace-p (aref elem 0))))) 267 (shr-char-nospace-p (aref elem 0)))))
272 (delete-char -1))) 268 (delete-char -1)))
269 ;; The shr-start is a special variable that is used to pass
270 ;; upwards the first point in the buffer where the text really
271 ;; starts.
272 (unless shr-start
273 (setq shr-start (point)))
273 (insert elem) 274 (insert elem)
274 (let (found) 275 (let (found)
275 (while (and (> (current-column) shr-width) 276 (while (and (> (current-column) shr-width)