bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16993: advice-add hides docstring


From: Stefan
Subject: bug#16993: advice-add hides docstring
Date: Wed, 19 Mar 2014 14:29:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> Some advice-add'ed functions lose their docstring.  Current examples
> from "emacs -Q" include `insert-directory', `rename-buffer' and
> `create-file-buffer'.

That's an incompatibility with Snarf-documentation: Snarf-documentation
scans the DOC file, finds the doc of rename-buffer, and tries to stick
the corresponding DOC offset in rename-buffer's "docstring slot".
This should set the "docstring slot" of the #<subr rename-buffer>, but
instead (symbol-function 'rename-buffer) returns an `advice--p' object,
so Snarf-documentation tries to set the docstring slot of that object
(which fails because the vector doesn't have a slot for it, but even if
it succeeded it wouldn't be what we want).

We can either fix it by teaching Snarf-documentation about advised
function (yuck!) or by not advising functions that are documented in
DOC.  IOW the right fix is to get rid of those advices in uniquify.el.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]