GNU bug report logs - #16993
advice-add hides docstring

Previous Next

Package: emacs;

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


Message #29 received at 16993 <at> debbugs.gnu.org (full text, mbox):

From: Stefan <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 16993 <at> debbugs.gnu.org
Subject: Re: bug#16993: advice-add hides docstring
Date: Wed, 19 Mar 2014 14:29:19 -0400
> 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.