From: "Drew Adams" <drew.adams@oracle.com>
To: <rms@gnu.org>, "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: yamaoka@jpl.org, emacs-devel@gnu.org
Subject: RE: [Emacs-diffs] /srv/bzr/emacs/trunk r111086: gmm-utils.el(gmm-flet, gmm-labels): New macros.
Date: Wed, 5 Dec 2012 11:35:41 -0800 [thread overview]
Message-ID: <9CFE702F7B9D4624AAF7B3D460D25E3D@us.oracle.com> (raw)
In-Reply-To: <E1TgKf4-0007aw-1M@fencepost.gnu.org>
> The problem with defadvice is that it overrides
> functions. The letf cases we're talking about also
> override functions, so they're just as nasty as uses
> of defadvice. Worse, they don't even announce themselves
> in the docstring and they often remove themselves before you get
> a chance to see that some overriding is going on.
>
> The reason it is bad for the Emacs sources to override functions in
> the Emacs sources is that it makes for confusion in debugging.
That is exactly the main reason I don't like to use defadvice too much in my own
code. Our debugger (I generally use `debug', not `edebug') digests it poorly
(not sure how it could do things much better, however).
There might be more important reasons to use or not to use defadvice, but
debugging confusion is a major reason I avoid it.
> Thus my decision many years ago that the Emacs sources should not
> contain any advice for functions. I considered every use of
> defadvice in the Emacs source code as a problem to be fixed.
> I did not fix them all, only for lack of time.
>
> I think the same argument applies to letf. So the Emacs sources
> should not contain advice or letf.
>
> Users can use these features -- the only people they might confuse
> are themselves, and we can leave it up to them to decide whether to
> take that risk. However, in our code, we should handle these
> situations in other ways.
Makes sense to me.
next prev parent reply other threads:[~2012-12-05 19:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Tfocu-00056V-AU@vcs.savannah.gnu.org>
2012-12-04 18:52 ` [Emacs-diffs] /srv/bzr/emacs/trunk r111086: gmm-utils.el (gmm-flet, gmm-labels): New macros Stefan Monnier
2012-12-04 22:39 ` Katsumi Yamaoka
2012-12-04 23:05 ` Katsumi Yamaoka
2012-12-05 0:14 ` Katsumi Yamaoka
2012-12-05 2:26 ` Katsumi Yamaoka
2012-12-05 4:19 ` Stefan Monnier
2012-12-05 5:46 ` Katsumi Yamaoka
2012-12-05 19:29 ` Richard Stallman
2012-12-05 19:35 ` Drew Adams [this message]
2012-12-06 2:01 ` Katsumi Yamaoka
2012-12-06 13:27 ` Stefan Monnier
2012-12-06 22:46 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9CFE702F7B9D4624AAF7B3D460D25E3D@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
--cc=yamaoka@jpl.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.