From: Stefan Monnier Date: Wed, 26 Jun 2024 20:18:57 +0000 (-0400) Subject: (quail-input-method): Fix bug#70541 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b18e25fabb371b7626745e5529c6db68100a3f04;p=emacs.git (quail-input-method): Fix bug#70541 * lisp/international/quail.el (quail-input-method): Don't bind `inhibit-modification-hooks`. (quail-point-in-conversion-region): Simplify. (cherry picked from commit 78951610a6e9a2977008a8d5884bf1f2f8330da2) --- diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 48d2ccb8828..cb7aa89b252 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1334,9 +1334,13 @@ If STR has `advice' text property, append the following special event: (quail-setup-overlays (quail-conversion-keymap)) (with-silent-modifications (unwind-protect - (let ((input-string (if (quail-conversion-keymap) + (let* (;; `with-silent-modifications' inhibits the modification + ;; hooks, but that's a part of `with-silent-modifications' + ;; we don't actually want here (bug#70541). + (inhibit-modification-hooks nil) + (input-string (if (quail-conversion-keymap) (quail-start-conversion key) - (quail-start-translation key)))) + (quail-start-translation key)))) (setq quail-guidance-str "") (when (and (stringp input-string) (> (length input-string) 0)) @@ -1871,10 +1875,9 @@ sequence counting from the head." (defsubst quail-point-in-conversion-region () "Return non-nil value if the point is in conversion region of Quail mode." - (let (start pos) - (and (setq start (overlay-start quail-conv-overlay)) - (>= (setq pos (point)) start) - (<= pos (overlay-end quail-conv-overlay))))) + (let ((start (overlay-start quail-conv-overlay))) + (and start + (<= start (point) (overlay-end quail-conv-overlay))))) (defun quail-conversion-backward-char () (interactive)