unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Problems with advice...
Date: Thu, 17 Mar 2005 11:00:04 +0100	[thread overview]
Message-ID: <x5hdja1tjv.fsf@lola.goethe.zz> (raw)


I have the problem that preactivated advice no longer gets
preactivated.  However, the same problem occurs now with a current
compilation of Emacs-21.3!  So I suspect that it might be
compiler-related (gcc-4.0).  It worked at one point of time in the
past.

Whatever.  In the search for the problem I have also come across the
following code snippet in advice.el:

		    ((and orig-subr-p
			  orig-interactive-p
			  (not interactive-form)
			  (not advised-interactive-form))
		     ;; Check whether we were called interactively
		     ;; in order to do proper prompting:
		     `(if (called-interactively-p)
			  (call-interactively ',origname)
			,(ad-make-mapped-call orig-arglist
					      advised-arglist
					      origname)))
		    ;; And now for normal functions and non-interactive subrs
	            ;; (or subrs whose interactive behavior was advised):
		    (t (ad-make-mapped-call
			advised-arglist orig-arglist origname)))))

This looks so wrong that I want somebody with more of a clue to take a
look at it: ad-make-mapped-call is called in two branches of a cond,
and the order of its first two arguments is interchanged in those two
calls!

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

             reply	other threads:[~2005-03-17 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 10:00 David Kastrup [this message]
2005-03-17 10:41 ` Problems with advice David Kastrup
2005-03-17 14:41 ` 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=x5hdja1tjv.fsf@lola.goethe.zz \
    --to=dak@gnu.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 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).