]> git.eshelyaron.com Git - emacs.git/commitdiff
Documentation followup for last change
authorEli Zaretskii <eliz@gnu.org>
Thu, 23 May 2024 13:23:57 +0000 (16:23 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 May 2024 20:36:34 +0000 (22:36 +0200)
* etc/NEWS: Announce the change in 'key-translate'.

* doc/lispref/commands.texi (Event Mod): Update documentation of
'key-translate'.  (Bug#70139)

(cherry picked from commit b53a20c61d30d4bef43f069b795b8c79bbaf091a)

doc/lispref/commands.texi
etc/NEWS

index b632e5e45ea31212f4a922b60ac26a2820fd6065..925ec765d1ec157b9097378bc7ce2ddac900426b 100644 (file)
@@ -3738,8 +3738,11 @@ if you want to translate characters after input methods operate.
 
 @defun key-translate from to
 This function modifies @code{keyboard-translate-table} to translate
-character code @var{from} into character code @var{to}.  It creates
-the keyboard translate table if necessary.
+character code @var{from} into character code @var{to}.  It creates the
+keyboard translate table if necessary.  Both @var{from} and @var{to}
+should be strings that satisfy @code{key-valid-p} (@pxref{Key
+Sequences}).  If @var{to} is @code{nil}, the function removes any
+existing translation for @var{from}.
 @end defun
 
   Here's an example of using the @code{keyboard-translate-table} to
index afb8cb54c605bec8ee4b759e2c55506b470368d8..83e89685ea9d7e985a49d22fbfa7b96fd61400b0 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2365,6 +2365,11 @@ rather than signaling an error.
 It is bound to the key sequence that caused a call to a function bound
 within 'function-key-map' or 'input-decode-map' around those calls.
 
++++
+** The function 'key-translate' can now remove translations.
+If the second argument TO is nil, the existing key translation is
+removed.
+
 +++
 ** New variables describing the names of built in programs.
 The new variables 'ctags-program-name', 'ebrowse-program-name',