Skip to content

faulty rendering of string quoting in docstring #369

Description

@mooseyboots

for me, helpful doesn't render the docstring of replace-regexp correctly, which led to long-term confusion on my part.

helpful's doctring:

"In TO-STRING, \& stands for whatever matched the whole of REGEXP,
and \=\N (where N is a digit) stands for whatever matched
the Nth \(...\) (1-based) in REGEXP."

describe-functions version of same:

In TO-STRING, ‘\&’ stands for whatever matched the whole of REGEXP,
and ‘\N’ (where N is a digit) stands for whatever matched
the Nth ‘\(...\)’ (1-based) in REGEXP.
‘\?’ lets you edit the replacement text in the minibuffer
at the given position for each replacement.

\=\N is what confused me, it should display as \N.

raw docstring:

In TO-STRING, `\\&' stands for whatever matched the whole of REGEXP,
and `\\=\\N' (where N is a digit) stands for whatever matched
the Nth `\\(...\\)' (1-based) in REGEXP.
`\\?' lets you edit the replacement text in the minibuffer
at the given position for each replacement.

\= (or \\=) quotes the following character and shouldn't be rendered itself

https://www.gnu.org/software/emacs/manual/html_node/elisp/Keys-in-Documentation.html

is this an issue for other helpful users too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions