From dd0bc520145718888252611792fe53cae648531b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 6 Nov 2021 19:13:44 +0200 Subject: [PATCH] Fix an error in 'highlight-confusing-reorderings' * 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 91219ca480c..d36d878c19a 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -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 -- 2.39.2