emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102012: shr.el (shr-find-fill-point)


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102012: shr.el (shr-find-fill-point): Shorten line if the preceding char is kinsoku-eol regardless of shr-kinsoku-shorten.
Date: Wed, 20 Oct 2010 00:44:28 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102012
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Wed 2010-10-20 00:44:28 +0000
message:
  shr.el (shr-find-fill-point): Shorten line if the preceding char is 
kinsoku-eol regardless of shr-kinsoku-shorten.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-10-20 00:02:35 +0000
+++ b/lisp/gnus/ChangeLog       2010-10-20 00:44:28 +0000
@@ -1,3 +1,8 @@
+2010-10-20  Katsumi Yamaoka  <address@hidden>
+
+       * shr.el (shr-find-fill-point): Shorten line if the preceding char is
+       kinsoku-eol regardless of shr-kinsoku-shorten.
+
 2010-10-19  Lars Magne Ingebrigtsen  <address@hidden>
 
        * shr.el (shr-find-fill-point): Don't leave blanks at the start of some

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2010-10-20 00:02:35 +0000
+++ b/lisp/gnus/shr.el  2010-10-20 00:44:28 +0000
@@ -272,13 +272,19 @@
          ;; Don't put kinsoku-bol characters at the beginning of a line,
          ;; or kinsoku-eol characters at the end of a line,
          (let ((count 4))
-           (if shr-kinsoku-shorten
+           (if (or shr-kinsoku-shorten
+                   (and (aref (char-category-set (preceding-char)) ?<)
+                        (progn
+                          (setq count (1- count))
+                          (backward-char 1)
+                          t)))
                (while (and
-                       (> count 0)
+                       (>= (setq count (1- count)) 0)
+                       (not (memq (preceding-char) (list ?\C-@ ?\n ? )))
                        (or (aref (char-category-set (preceding-char)) ?<)
                            (aref (char-category-set (following-char)) ?>)))
                  (backward-char 1))
-             (while (and (> count 0)
+             (while (and (>= (setq count (1- count)) 0)
                          (aref (char-category-set (following-char)) ?>))
                (forward-char 1)))
            (when (eq (following-char) ? )


reply via email to

[Prev in Thread] Current Thread [Next in Thread]