GNU bug report logs - #37785
[PATCH] Add a way to disable substitution of command keys in help strings

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Thu, 17 Oct 2019 01:42:02 UTC

Severity: wishlist

Tags: patch

Done: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: rpluim <at> gmail.com, 37785 <at> debbugs.gnu.org
Subject: bug#37785: [PATCH] Add a way to disable substitution of command keys in help strings
Date: Thu, 17 Oct 2019 20:18:58 +0300
> Cc: rpluim <at> gmail.com, 37785 <at> debbugs.gnu.org
> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
> Date: Thu, 17 Oct 2019 11:53:45 -0400
> 
> I've attached an updated patch.

Thanks, I have a few minor comments.

> * src/keyboard.c (help_echo_substitute_command_keys): New function

Missing period at end of sentence.

> diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
> index d7b04d2934..22a007592b 100644
> --- a/doc/lispref/text.texi
> +++ b/doc/lispref/text.texi
> @@ -3736,9 +3736,11 @@ Special Properties
>  @pxref{Extended Menu Items}), or tool bar help strings (@pxref{Tool
>  Bar}).  The specified function is called with one argument, the help
>  string to display, which is passed through
> -@code{substitute-command-keys} before being given to the function; see
> -@ref{Keys in Documentation}.  Tooltip mode (@pxref{Tooltips,,, emacs,
> -The GNU Emacs Manual}) provides an example.
> +@code{substitute-command-keys} before being given to the function,
> +unless the help string has a non-nil
                                ^^^^^^
In the Info manuals, we give "nil" the @code markup: non-@code{nil}.

Please also add here an index entry, so that readers could find this
information quickly.  Suggestion:

 @cindex help-echo text, avoid command-key substitution

Also, please add the description of this face to the list in "Special
Properties".

> +** New text property 'help-echo-inhibit-substitution'.
> +Setting this on the first character of a help string disables
> +conversion via 'substitute-command-keys'.
   ^^^^^^^^^^
I'd use "conversions" here, in plural.

> +  return Fsubstitute_command_keys(help);
                                    ^
Our convention is to leave one blank between a function's name and the
opening parenthesis.




This bug report was last modified 5 years and 298 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.