From 797bed4c177aba5751803cd130ee237d1277aeed Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 3 Oct 2024 11:55:58 -0400 Subject: [PATCH] (key-translate-select): Minor tweaks * lisp/keymap.el (key-translate-select): Rename from `key-select-translation` so as to stick to the `key-translate-` prefix. Silence compilation warning. (cherry picked from commit 0894d3835e8f841045cc7cd9db2184cac35fcbb1) --- lisp/keymap.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/keymap.el b/lisp/keymap.el index d53ed702527..abb293e7f23 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -416,7 +416,7 @@ Interactively, prompt for FROM and TO with `read-char'." (aref from-key 0) (and to (aref to-key 0))))) -(defun key-select-translation () +(defun key-translate-select () "Prompt for a current keyboard translation pair with `completing-read'. Each pair is formatted as \"FROM -> TO\". @@ -446,6 +446,7 @@ Return the \"FROM\" as a key string." (if (characterp chr) (funcall key-code-func chr trans) (require 'range) + (declare-function range-map "range" (func range)) (range-map (lambda (kc) (funcall key-code-func kc trans)) chr))) @@ -462,7 +463,7 @@ Return the \"FROM\" as a key string." FROM must satisfy `key-valid-p'. If FROM has no entry in `keyboard-translate-table', this has no effect." - (interactive (list (key-select-translation))) + (interactive (list (key-translate-select))) (key-translate from nil)) (defun keymap-lookup (keymap key &optional accept-default no-remap position) -- 2.39.2