summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 9928b28fb6e..766bae0845c 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1173,7 +1173,8 @@ Otherwise, return a new string."
(let ((k (buffer-substring-no-properties orig-point (point))))
(cond ((= (length k) 0)
(error "Empty key sequence in substitution"))
- ((not (key-valid-p k))
+ ((and (not (string-match-p "\\`M-x " k))
+ (not (key-valid-p k)))
(error "Invalid key sequence in substitution: `%s'" k))))
(add-text-properties orig-point (point)
'( face help-key-binding