unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan <monnier@iro.umontreal.ca>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 16993@debbugs.gnu.org
Subject: bug#16993: advice-add hides docstring
Date: Wed, 19 Mar 2014 14:29:19 -0400	[thread overview]
Message-ID: <jwva9cmyrl4.fsf-monnier+bug#16993@gnu.org> (raw)
In-Reply-To: <CAAeL0SQWmVsfx=od+BD5z2UR9FOzeDX7y+P88wxoP48McdeaRA@mail.gmail.com> (Juanma Barranquero's message of "Wed, 12 Mar 2014 05:38:03 +0100")

> 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





  parent reply	other threads:[~2014-03-19 18:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12  4:38 bug#16993: advice-add hides docstring Juanma Barranquero
2014-03-12 19:34 ` Glenn Morris
2014-03-12 19:49   ` Juanma Barranquero
2014-03-12 19:55     ` Glenn Morris
2014-03-12 20:15       ` Juanma Barranquero
2014-03-12 20:31         ` Glenn Morris
2014-03-12 20:33           ` Juanma Barranquero
2014-03-19 16:53       ` Juanma Barranquero
2014-03-19 18:29 ` Stefan [this message]
2014-03-20  5:18   ` Juanma Barranquero
2014-03-20 12:56     ` Stefan
2014-03-20 13:56       ` Juanma Barranquero
2014-03-20 15:57         ` Glenn Morris
2014-03-20 16:02 ` Stefan
2014-03-20 16:18   ` Juanma Barranquero
2014-03-20 17:55     ` Stefan
2014-03-20 17:59       ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jwva9cmyrl4.fsf-monnier+bug#16993@gnu.org' \
    --to=monnier@iro.umontreal.ca \
    --cc=16993@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).