]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix an error in 'highlight-confusing-reorderings'
authorEli Zaretskii <eliz@gnu.org>
Sat, 6 Nov 2021 17:13:44 +0000 (19:13 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 6 Nov 2021 17:13:44 +0000 (19:13 +0200)
* lisp/international/mule-cmds.el
(highlight-confusing-reorderings): Don't signal an error when
a confusingly-reordered sequence ends at EOB.

lisp/international/mule-cmds.el

index 91219ca480cab4c448587d2bb046b0045289d3ae..d36d878c19a1883653413ec9f60077b8f3d17d05 100644 (file)
@@ -3338,9 +3338,11 @@ or the active region if that is set."
                    (re-search-backward reorder-starters nil t)))
                 (finish
                  (save-excursion
-                   (re-search-forward reorder-enders nil t))))
+                   (let ((fin (re-search-forward reorder-enders nil t)))
+                     (if fin (1- fin)
+                       (point-max))))))
             (with-silent-modifications
-              (add-text-properties start (1- finish)
+              (add-text-properties start finish
                                    '(font-lock-face
                                      confusingly-reordered
                                      face confusingly-reordered