]> git.eshelyaron.com Git - emacs.git/commitdiff
Correct earlier change to map-ynp
authorPo Lu <luangruo@yahoo.com>
Wed, 8 May 2024 12:22:29 +0000 (20:22 +0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 8 May 2024 16:53:09 +0000 (18:53 +0200)
* 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)

lisp/emacs-lisp/map-ynp.el

index 1a9655b1f7bbd9713d97765269921e4b7d169e32..7b135c54a150947091ef6139ee98fe76cf9f9d47 100644 (file)
@@ -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