emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115763: Fix another shr infloop in the filling code


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] trunk r115763: Fix another shr infloop in the filling code
Date: Fri, 27 Dec 2013 03:04:17 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115763
revision-id: address@hidden
parent: address@hidden
committer: Lars Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Fri 2013-12-27 03:58:16 +0100
message:
  Fix another shr infloop in the filling code
  
  (shr-find-fill-point): Off by one error in comparison with the
  indentation.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/shr.el                shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-27 02:21:42 +0000
+++ b/lisp/ChangeLog    2013-12-27 02:58:16 +0000
@@ -5,6 +5,8 @@
        infloop.
        (shr-insert): Fill repeatedly long texts, so that Japanese is
        formatted correctly (bug#16263).
+       (shr-find-fill-point): Off by one error in comparison with the
+       indentation.
 
 2013-12-26  João Távora <address@hidden>
 

=== modified file 'lisp/net/shr.el'
--- a/lisp/net/shr.el   2013-12-27 02:21:02 +0000
+++ b/lisp/net/shr.el   2013-12-27 02:58:16 +0000
@@ -478,7 +478,7 @@
     (backward-char 1))
   (let ((bp (point))
        failed)
-    (while (not (or (setq failed (< (current-column) shr-indentation))
+    (while (not (or (setq failed (<= (current-column) shr-indentation))
                    (eq (preceding-char) ? )
                    (eq (following-char) ? )
                    (shr-char-breakable-p (preceding-char))
@@ -486,7 +486,8 @@
                    (and (shr-char-kinsoku-bol-p (preceding-char))
                         (shr-char-breakable-p (following-char))
                         (not (shr-char-kinsoku-bol-p (following-char))))
-                   (shr-char-kinsoku-eol-p (following-char))))
+                   (shr-char-kinsoku-eol-p (following-char))
+                   (bolp)))
       (backward-char 1))
     (if failed
        ;; There's no breakable point, so we give it up.
@@ -508,7 +509,7 @@
         (while (and (not (memq (preceding-char) (list ?\C-@ ?\n ? )))
                     (shr-char-kinsoku-eol-p (preceding-char)))
           (backward-char 1))
-        (when (setq failed (< (current-column) shr-indentation))
+        (when (setq failed (<= (current-column) shr-indentation))
           ;; There's no breakable point that doesn't violate kinsoku,
           ;; so we look for the second best position.
           (while (and (progn
@@ -528,7 +529,7 @@
                      (not (memq (preceding-char) (list ?\C-@ ?\n ? )))
                      (or (shr-char-kinsoku-eol-p (preceding-char))
                          (shr-char-kinsoku-bol-p (following-char)))))))
-        (when (setq failed (< (current-column) shr-indentation))
+        (when (setq failed (<= (current-column) shr-indentation))
           ;; There's no breakable point that doesn't violate kinsoku,
           ;; so we go to the second best position.
           (if (looking-at "\\(\\c<+\\)\\c<")


reply via email to

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