diff options
| author | Po Lu | 2023-08-09 20:42:44 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-09 20:43:37 +0800 |
| commit | caa3bc8aa8fd4c46268fef135936d2f1901888fc (patch) | |
| tree | ce3747dee401555ea8add10e2097baf9f7f08123 | |
| parent | 18a84922c5167c995f03c5c023c978f127d37dde (diff) | |
| download | emacs-caa3bc8aa8fd4c46268fef135936d2f1901888fc.tar.gz emacs-caa3bc8aa8fd4c46268fef135936d2f1901888fc.zip | |
Don't signal when I-search occurs within a kbd macro
* lisp/isearch.el (isearch-mode): Check last-event-frame is not
`macro' before providing it to `device-class'. (bug#65175)
| -rw-r--r-- | lisp/isearch.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index daf884d3d53..a3c32e06004 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1342,10 +1342,14 @@ used to set the value of `isearch-regexp-function'." | |||
| 1342 | 1342 | ||
| 1343 | ;; If the keyboard is not up and the last event did not come from | 1343 | ;; If the keyboard is not up and the last event did not come from |
| 1344 | ;; a keyboard, bring it up so that the user can type. | 1344 | ;; a keyboard, bring it up so that the user can type. |
| 1345 | (when (or (not last-event-frame) | 1345 | ;; |
| 1346 | (not (eq (device-class last-event-frame | 1346 | ;; last-event-frame may be `macro', since people apparently make use |
| 1347 | last-event-device) | 1347 | ;; of I-search in keyboard macros. (bug#65175) |
| 1348 | 'keyboard))) | 1348 | (when (and (not (eq last-event-frame 'macro)) |
| 1349 | (or (not last-event-frame) | ||
| 1350 | (not (eq (device-class last-event-frame | ||
| 1351 | last-event-device) | ||
| 1352 | 'keyboard)))) | ||
| 1349 | (frame-toggle-on-screen-keyboard (selected-frame) nil)) | 1353 | (frame-toggle-on-screen-keyboard (selected-frame) nil)) |
| 1350 | 1354 | ||
| 1351 | ;; Disable text conversion so that isearch can behave correctly. | 1355 | ;; Disable text conversion so that isearch can behave correctly. |