unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mark Lillibridge <mdl@alum.mit.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 13305@debbugs.gnu.org
Subject: bug#13305: 24.2; describe-function gives incorrect function location information (for functions changed in a hook?)
Date: Tue, 01 Jan 2013 11:34:22 -0800	[thread overview]
Message-ID: <87d2xovgsh.fsf@foil.strangled.net> (raw)
In-Reply-To: <jwvmwwvhqt3.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sun, 30 Dec 2012 21:57:42 -0500)


Stefan Monnier <monnier@iro.umontreal.ca> writes:

>  >     Basically, this replaces the built-in version of
>  > rmail-summary-output with a patched version; the patching is done only
>  
>  Don't do that.  Use defadvice or advice-add instead.

    For some reason I was thinking that changes to interactive didn't
work properly with advice.  Just using defun can be more convenient than
advice, however, when you are in a hurry for a temporary patch.

    It's too bad there isn't a macro for replace-defun that acts
syntactically identical to defun except that it uses advice to patch
lazily the built-in (e.g., part of Emacs distribution) function.  This
would be a lot easier for users to understand and use.  For that matter,
what would be really useful is a small (10-20 page?) guide to patching
Emacs with this sort of useful information.  Yes, I know there is a 800+
page elisp manual that contains a lot of this information somewhere
(maybe?)  But the reality is that the average person trying to patch
Emacs doesn't have time to read the manual and limits themselves to
Google searches.  You don't discover advice that way.

- Mark





  reply	other threads:[~2013-01-01 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-29 20:16 bug#13305: 24.2; describe-function gives incorrect function location information (for functions changed in a hook?) Mark Lillibridge
2012-12-31  2:57 ` Stefan Monnier
2013-01-01 19:34   ` Mark Lillibridge [this message]
2013-01-03 17:22     ` Stefan Monnier
2013-01-23  2:16     ` Stefan Monnier
2012-12-31  2:59 ` Stefan Monnier
2013-01-01 19:35   ` Mark Lillibridge
2013-01-03 17:19     ` Stefan Monnier

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=87d2xovgsh.fsf@foil.strangled.net \
    --to=mdl@alum.mit.edu \
    --cc=13305@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).