GNU bug report logs -
#16993
advice-add hides docstring
Previous Next
Reported by: Juanma Barranquero <lekktu <at> gmail.com>
Date: Wed, 12 Mar 2014 04:39:01 UTC
Severity: important
Found in version 24.3.50
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> 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
This bug report was last modified 11 years and 60 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.