From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Stephens Newsgroups: gmane.emacs.devel Subject: Re: called-interactively-p, cedet, and Emacs 23.1 and earlier Date: Mon, 26 Apr 2010 16:28:02 +0100 Message-ID: <80pr1mmdx9.fsf@tiny.isode.net> References: <4BAA41B0.1020103@siege-engine.com> <4BABEEC0.4030902@siege-engine.com> <60368.130.55.118.19.1269617620.squirrel@webmail.lanl.gov> <4BACDB7A.9090500@siege-engine.com> <4BAE120C.7090709@siege-engine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272295720 21536 80.91.229.12 (26 Apr 2010 15:28:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 26 Apr 2010 15:28:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 26 17:28:37 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O6QEQ-0007VT-TP for ged-emacs-devel@m.gmane.org; Mon, 26 Apr 2010 17:28:34 +0200 Original-Received: from localhost ([127.0.0.1]:37419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6QEJ-0006Fc-Qm for ged-emacs-devel@m.gmane.org; Mon, 26 Apr 2010 11:28:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6QED-0006Ea-PE for emacs-devel@gnu.org; Mon, 26 Apr 2010 11:28:09 -0400 Original-Received: from [140.186.70.92] (port=34240 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6QEC-0006E3-5t for emacs-devel@gnu.org; Mon, 26 Apr 2010 11:28:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6QE9-0004HR-Ce for emacs-devel@gnu.org; Mon, 26 Apr 2010 11:28:06 -0400 Original-Received: from rufus.isode.com ([62.3.217.251]:32861) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6QE9-0004Gx-5i for emacs-devel@gnu.org; Mon, 26 Apr 2010 11:28:05 -0400 Original-Received: from tiny.isode.net (shiny.isode.com [62.3.217.250]) by rufus.isode.com (submission channel) via TCP with ESMTPA id for ; Mon, 26 Apr 2010 16:28:01 +0100 Original-Received: by tiny.isode.net (sSMTP sendmail emulation); Mon, 26 Apr 2010 16:28:02 +0100 In-Reply-To: (Stefan Monnier's message of "Sat, 27 Mar 2010 14:18:29 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Hashcash: 1:20:100426:emacs-devel@gnu.org::38YflISTnRdR9aJp:0000000000000000000000000000000000000000003N3v X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124221 Archived-At: Stefan Monnier writes: >> Anyway, that makes it obvious why Stefan used a macro before. > > ;-) > >> Does anyone know of a way to solve this, or do I need to maintain this >> difference in my code? > > Sorry for not posting more concrete code earlier (it has several other > bugs, such as not evaluating the arg), but I think the solution is > pretty much what I suggested, except you need to use > cedet-called-interactively-p everywhere and have it macro-expand to > either interactive-p or called-interactively-p with or without args > depending on what's available. I find it doesn't work everywhere (in Emacs 23.1, running with the external CVS version of cedet). I get errors about cedet-called-interactively-p being an invalid function. I'm fairly sure it's this defadvice code: (defadvice beginning-of-defun (around senator activate) "Move backward to the beginning of a defun. If semantic tags are available, use them to navigate." (if (and senator-minor-mode (cedet-called-interactively-p)) (senator-beginning-of-defun (ad-get-arg 0)) ad-do-it)) As far as I can tell this is being byte-compiled with the macro visible. So is there some magic with defadvice and macros?