From: Eli Zaretskii Date: Sat, 6 Nov 2021 17:13:44 +0000 (+0200) Subject: Fix an error in 'highlight-confusing-reorderings' X-Git-Tag: emacs-29.0.90~3671^2~192 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dd0bc520145718888252611792fe53cae648531b;p=emacs.git 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. --- 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