]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't signal when I-search occurs within a kbd macro
authorPo Lu <luangruo@yahoo.com>
Wed, 9 Aug 2023 12:42:44 +0000 (20:42 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 9 Aug 2023 12:43:37 +0000 (20:43 +0800)
* lisp/isearch.el (isearch-mode): Check last-event-frame is not
`macro' before providing it to `device-class'.  (bug#65175)

lisp/isearch.el

index daf884d3d53737f91a2eb5244b3637280da6ecba..a3c32e060048c56614f41d8192741e26ebd144e0 100644 (file)
@@ -1342,10 +1342,14 @@ used to set the value of `isearch-regexp-function'."
 
   ;; If the keyboard is not up and the last event did not come from
   ;; a keyboard, bring it up so that the user can type.
-  (when (or (not last-event-frame)
-            (not (eq (device-class last-event-frame
-                                   last-event-device)
-                     'keyboard)))
+  ;;
+  ;; last-event-frame may be `macro', since people apparently make use
+  ;; of I-search in keyboard macros.  (bug#65175)
+  (when (and (not (eq last-event-frame 'macro))
+             (or (not last-event-frame)
+                 (not (eq (device-class last-event-frame
+                                        last-event-device)
+                          'keyboard))))
     (frame-toggle-on-screen-keyboard (selected-frame) nil))
 
   ;; Disable text conversion so that isearch can behave correctly.