From: Po Lu Date: Wed, 8 May 2024 12:22:29 +0000 (+0800) Subject: Correct earlier change to map-ynp X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=934aa178f070c0302c2519a68e3890e16b0f114a;p=emacs.git Correct earlier change to map-ynp * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't call set-text-conversion-style if not bound. (cherry picked from commit 32b8c078177d6a27da535cdb5365aad90bf0f8af) --- diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 1a9655b1f7b..7b135c54a15 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -178,9 +178,11 @@ The function's value is the number of actions taken." ;; https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00441.html ;; for the details. (let ((overriding-text-conversion-style nil)) - (set-text-conversion-style text-conversion-style) + (when (fboundp 'set-text-conversion-style) + (set-text-conversion-style text-conversion-style)) (setq char (read-event))) - (set-text-conversion-style text-conversion-style)) + (when (fboundp 'set-text-conversion-style) + (set-text-conversion-style text-conversion-style))) ;; Show the answer to the question. (message "%s(y, n, !, ., q, %sor %s) %s" prompt user-keys