]> git.eshelyaron.com Git - emacs.git/commitdiff
(quail-input-method): Fix bug#70541
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 26 Jun 2024 20:18:57 +0000 (16:18 -0400)
committerEshel Yaron <me@eshelyaron.com>
Thu, 27 Jun 2024 19:24:12 +0000 (21:24 +0200)
* lisp/international/quail.el (quail-input-method): Don't bind
`inhibit-modification-hooks`.
(quail-point-in-conversion-region): Simplify.

(cherry picked from commit 78951610a6e9a2977008a8d5884bf1f2f8330da2)

lisp/international/quail.el

index 48d2ccb8828d57635606146d81d74d67afb01c88..cb7aa89b252ab73aa67ed5e19ce6cfb4d65e54e2 100644 (file)
@@ -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)