diff options
| author | Gerd Möllmann | 2025-02-06 05:31:38 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2025-02-06 05:36:18 +0100 |
| commit | ea04dd8ca93d609c0ee475c4acf58a56dfc0f1f3 (patch) | |
| tree | ae1d0a44d7cbacc9a87b143324e6a56d012d50f7 | |
| parent | 1f4a26df862917c956e79fc2ca111caebf895623 (diff) | |
| download | emacs-ea04dd8ca93d609c0ee475c4acf58a56dfc0f1f3.tar.gz emacs-ea04dd8ca93d609c0ee475c4acf58a56dfc0f1f3.zip | |
Use read-key in amp-y-or-n-p (bug#75886)
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use read-key
so that C-g in recognized when defined in input-decode-map.
| -rw-r--r-- | lisp/emacs-lisp/map-ynp.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 14cbbfda033..18277b60fb8 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el | |||
| @@ -185,7 +185,12 @@ The function's value is the number of actions taken." | |||
| 185 | (let ((overriding-text-conversion-style nil)) | 185 | (let ((overriding-text-conversion-style nil)) |
| 186 | (when (fboundp 'set-text-conversion-style) | 186 | (when (fboundp 'set-text-conversion-style) |
| 187 | (set-text-conversion-style text-conversion-style)) | 187 | (set-text-conversion-style text-conversion-style)) |
| 188 | (setq char (read-event))) | 188 | ;; Do NOT use read-event here. That |
| 189 | ;; function does not consult | ||
| 190 | ;; input-decode-map (bug#75886). | ||
| 191 | (setq char (read-key)) | ||
| 192 | (when (eq char ?\C-g) | ||
| 193 | (signal 'quit nil))) | ||
| 189 | (when (fboundp 'set-text-conversion-style) | 194 | (when (fboundp 'set-text-conversion-style) |
| 190 | (set-text-conversion-style text-conversion-style))) | 195 | (set-text-conversion-style text-conversion-style))) |
| 191 | ;; Show the answer to the question. | 196 | ;; Show the answer to the question. |