aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2024-10-03 11:55:58 -0400
committerStefan Monnier2024-10-03 11:55:58 -0400
commit0894d3835e8f841045cc7cd9db2184cac35fcbb1 (patch)
tree91fd305721c6fb5c0222792658e3cd83c8ac5690
parent3139ce7ad42ab883eee5189d6cb19612f525f491 (diff)
downloademacs-0894d3835e8f841045cc7cd9db2184cac35fcbb1.tar.gz
emacs-0894d3835e8f841045cc7cd9db2184cac35fcbb1.zip
(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.
-rw-r--r--lisp/keymap.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/keymap.el b/lisp/keymap.el
index b65f34f96bf..7a19621441c 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -424,7 +424,7 @@ Interactively, prompt for FROM and TO with `read-char'."
424 (aref from-key 0) 424 (aref from-key 0)
425 (and to (aref to-key 0))))) 425 (and to (aref to-key 0)))))
426 426
427(defun key-select-translation () 427(defun key-translate-select ()
428 "Prompt for a current keyboard translation pair with `completing-read'. 428 "Prompt for a current keyboard translation pair with `completing-read'.
429 429
430Each pair is formatted as \"FROM -> TO\". 430Each pair is formatted as \"FROM -> TO\".
@@ -454,6 +454,7 @@ Return the \"FROM\" as a key string."
454 (if (characterp chr) 454 (if (characterp chr)
455 (funcall key-code-func chr trans) 455 (funcall key-code-func chr trans)
456 (require 'range) 456 (require 'range)
457 (declare-function range-map "range" (func range))
457 (range-map 458 (range-map
458 (lambda (kc) (funcall key-code-func kc trans)) 459 (lambda (kc) (funcall key-code-func kc trans))
459 chr))) 460 chr)))
@@ -470,7 +471,7 @@ Return the \"FROM\" as a key string."
470 471
471FROM must satisfy `key-valid-p'. If FROM has no entry in 472FROM must satisfy `key-valid-p'. If FROM has no entry in
472`keyboard-translate-table', this has no effect." 473`keyboard-translate-table', this has no effect."
473 (interactive (list (key-select-translation))) 474 (interactive (list (key-translate-select)))
474 (key-translate from nil)) 475 (key-translate from nil))
475 476
476(defun keymap-lookup (keymap key &optional accept-default no-remap position) 477(defun keymap-lookup (keymap key &optional accept-default no-remap position)