Subject: Re: 25.1.50; Bad input method description with spurious \= escapes
From: Paul Eggert <[email-masked]>
To: Vincent Belaïche <[email-masked]>
Cc: [email-masked]
Date: Mon, 18 Jan 2016 23:12:50 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for reporting this. I reproduce the problem, and installed the attached 
fix into the emacs-25 branch.
From 5ead1ecb8d084b4fab258c18fcea5233b0a22949 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Mon, 18 Jan 2016 23:09:15 -0800
Subject: [PATCH] Fix spurious escapes in describe-input-method
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Vincent Belaïche (Bug#22309).
* lisp/international/mule-cmds.el (describe-language-environment):
* lisp/international/quail.el (quail-help):
Apply substitute-command-keys to doc strings before displaying them.
---
 lisp/international/mule-cmds.el | 2 +-
 lisp/international/quail.el     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 79e9c7b..2df847a 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2119,7 +2119,7 @@ describe-language-environment
       (with-current-buffer standard-output
 	(insert language-name " language environment\n\n")
 	(if (stringp doc)
-	    (insert doc "\n\n"))
+	    (insert (substitute-command-keys doc) "\n\n"))
 	(condition-case nil
 	    (let ((str (eval (get-language-info language-name 'sample-text))))
 	      (if (stringp str)
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 75cb7f7..f5e3902 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -2516,7 +2516,7 @@ quail-help
 	      ")\n\n")
       (save-restriction
 	(narrow-to-region (point) (point))
-	(insert (quail-docstring))
+	(insert (substitute-command-keys (quail-docstring)))
 	(goto-char (point-min))
 	(with-syntax-table emacs-lisp-mode-syntax-table
 	  (while (re-search-forward "\\\\<\\sw\\(\\sw\\|\\s_\\)+>" nil t)
-- 
2.5.0