Subject: Re: bug#16993: advice-add hides docstring

From: Glenn Morris <[email-masked]>
Date: Wed, 12 Mar 2014 15:55:57 -0400

Juanma Barranquero wrote:

> Aha, I tried with two test functions, one with a key binding in its
> doc (\\[universal-argument]) and the other without, and indeed, the
> first one gets its advice info's font-locking removed and the other
> doesn't.
>
> I'll try to come with an easy fix, if at all possible, unless you beat
> me to it (feel free to ;-)

I don't intend to work on it, but IMO substitute-command-keys should
preserve text properties.
AFAIK, there's no particular reason why it removes them; see e.g.

http://lists.gnu.org/archive/html/emacs-pretest-bug/2005-11/msg00094.html

> Still, the other problem (docstrings missing) is much more serious.

I guess that's something to do with built-in functions.
(I don't see an issue with insert-directory.)