From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?TGx1w61z?= Newsgroups: gmane.emacs.devel Subject: Re: called-interactively-p, cedet, and Emacs 23.1 and earlier Date: Thu, 25 Mar 2010 15:33:17 +0100 Message-ID: <868w9g31zm.wl%lluis@ginnungagap.pc.ac.upc.edu> References: <4BAA41B0.1020103@siege-engine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1269528439 11743 80.91.229.12 (25 Mar 2010 14:47:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Mar 2010 14:47:19 +0000 (UTC) Cc: emacs-devel@gnu.org, "Eric M. Ludlam" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 25 15:47:14 2010 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 1NuoKz-0001Kx-Kw for ged-emacs-devel@m.gmane.org; Thu, 25 Mar 2010 15:47:09 +0100 Original-Received: from localhost ([127.0.0.1]:54809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuoIB-0008Jw-EZ for ged-emacs-devel@m.gmane.org; Thu, 25 Mar 2010 10:44:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nuo7d-0000LQ-24 for emacs-devel@gnu.org; Thu, 25 Mar 2010 10:33:21 -0400 Original-Received: from [140.186.70.92] (port=33340 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nuo7b-0000KY-B1 for emacs-devel@gnu.org; Thu, 25 Mar 2010 10:33:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nuo7Z-00080O-J4 for emacs-devel@gnu.org; Thu, 25 Mar 2010 10:33:18 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:53602) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Nuo7Z-000806-5f for emacs-devel@gnu.org; Thu, 25 Mar 2010 10:33:17 -0400 Original-Received: (qmail invoked by alias); 25 Mar 2010 14:33:13 -0000 Original-Received: from unknown (EHLO localhost) [84.88.50.48] by mail.gmx.net (mp011) with SMTP; 25 Mar 2010 15:33:13 +0100 X-Authenticated: #12333383 X-Provags-ID: V01U2FsdGVkX1+QBLRh3GSQSA6LpqTkYtA0JG+P3dm9JjA6RRTVIX MLr/GwhovcmdSf In-Reply-To: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/24.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67000000000000004 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:122654 Archived-At: >> We have recently stumbled over called-interactively-p, which is now used >> with an argument throughout the Emacs versions of the CEDET code. >> My externally maintained code I would like to have work in Emacs 22 and 23.1 >> which does not support the argument, and XEmacs which is missing the feature >> completely, and is thus easy to make work in this case. Could some kind soul >> help me define some advice, or other trick I can install in older Emacs to >> allow this form to work? > How 'bout Ok, so (unless my elisp is crappier than I thought) compatibility code for both emacs and xemacs would go like this: (case (fboundp 'called-interactively-p) ((t) > (condition-case nil > (called-interactively-p nil) > (defmacro called-interactively-p (arg) > (case arg > (interactive `(interactive-p)) > ((any nil) `(called-interactively-p))))) ) ((nil) (defun called-interactively-p (arg) ...whathever xemacs needs to do...))) Thanks, Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth