aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-08-19 08:48:20 +0800
committerPo Lu2023-08-19 08:48:20 +0800
commit6a4b6c3e836ce06bb1f69615bbdcb6745d2aff6f (patch)
tree98ccf598e31c93f923f6acddeaf8902d002dd7a9
parent4f1ce5db12639359822652673aa013345aa2991e (diff)
downloademacs-6a4b6c3e836ce06bb1f69615bbdcb6745d2aff6f.tar.gz
emacs-6a4b6c3e836ce06bb1f69615bbdcb6745d2aff6f.zip
Disable text conversion within read-char-from-minibuffer
* lisp/subr.el (read-char-from-minibuffer): Disable text conversion. (bug#65370) (y-or-n-p): Remove redundant binding of `override-text-conversion-style', given that read-key already disables text conversion. * src/textconv.c (Fset_text_conversion_style): Always reset text conversion for the selected frame in addition to any displaying current_buffer.
-rw-r--r--lisp/subr.el10
-rw-r--r--src/textconv.c5
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 51545fb5f11..f6332ce35e6 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3569,7 +3569,12 @@ There is no need to explicitly add `help-char' to CHARS;
3569 read-char-from-minibuffer-map)) 3569 read-char-from-minibuffer-map))
3570 ;; Protect this-command when called from pre-command-hook (bug#45029) 3570 ;; Protect this-command when called from pre-command-hook (bug#45029)
3571 (this-command this-command) 3571 (this-command this-command)
3572 (result (read-from-minibuffer prompt nil map nil (or history t))) 3572 (result (progn
3573 ;; Disable text conversion if it is enabled.
3574 ;; (bug#65370)
3575 (when (fboundp 'set-text-conversion-style)
3576 (set-text-conversion-style text-conversion-style))
3577 (read-from-minibuffer prompt nil map nil (or history t))))
3573 (char 3578 (char
3574 (if (> (length result) 0) 3579 (if (> (length result) 0)
3575 ;; We have a string (with one character), so return the first one. 3580 ;; We have a string (with one character), so return the first one.
@@ -3753,9 +3758,6 @@ like) while `y-or-n-p' is running)."
3753 (while 3758 (while
3754 (let* ((scroll-actions '(recenter scroll-up scroll-down 3759 (let* ((scroll-actions '(recenter scroll-up scroll-down
3755 scroll-other-window scroll-other-window-down)) 3760 scroll-other-window scroll-other-window-down))
3756 ;; Disable text conversion so that real key events
3757 ;; are sent.
3758 (overriding-text-conversion-style nil)
3759 (key 3761 (key
3760 (let ((cursor-in-echo-area t)) 3762 (let ((cursor-in-echo-area t))
3761 (when minibuffer-auto-raise 3763 (when minibuffer-auto-raise
diff --git a/src/textconv.c b/src/textconv.c
index 60f3ba80577..a4de991ef02 100644
--- a/src/textconv.c
+++ b/src/textconv.c
@@ -2138,7 +2138,10 @@ replacement key sequence returned starts a new key sequence and makes
2138 if (WINDOW_LIVE_P (f->old_selected_window) 2138 if (WINDOW_LIVE_P (f->old_selected_window)
2139 && FRAME_WINDOW_P (f) 2139 && FRAME_WINDOW_P (f)
2140 && EQ (XWINDOW (f->old_selected_window)->contents, 2140 && EQ (XWINDOW (f->old_selected_window)->contents,
2141 buffer)) 2141 buffer)
2142 /* Always reset the text conversion style of the
2143 selected frame. */
2144 || (f == SELECTED_FRAME ()))
2142 { 2145 {
2143 block_input (); 2146 block_input ();
2144 reset_frame_state (f); 2147 reset_frame_state (f);