From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#17446: 24.4.50; What is the situation around `called-interactively-p'? Date: Sat, 10 May 2014 10:41:53 +0200 Message-ID: <877g5uauum.fsf@gmail.com> References: <87tx8z6sp2.fsf@gmail.com> <819a6ab8-db8e-4176-a778-02218f08e7af@default> <6e5610f3-d741-4d61-903c-a8f3aa8f46fd@default> <87siojasqx.fsf@web.de> <87r442x00n.fsf@gmail.com> <87y4ya6pzx.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1399711407 9935 80.91.229.3 (10 May 2014 08:43:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 May 2014 08:43:27 +0000 (UTC) Cc: 17446@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 10 10:43:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wj2sI-0002se-Ky for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 10:43:18 +0200 Original-Received: from localhost ([::1]:56512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj2sI-0001JT-48 for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 04:43:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj2s8-0001JN-Us for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 04:43:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wj2s3-0003iL-2h for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 04:43:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj2s2-0003iH-Us for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 04:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wj2s2-0007d0-CH for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 04:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 May 2014 08:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17446 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17446-submit@debbugs.gnu.org id=B17446.139971132829217 (code B ref 17446); Sat, 10 May 2014 08:43:02 +0000 Original-Received: (at 17446) by debbugs.gnu.org; 10 May 2014 08:42:08 +0000 Original-Received: from localhost ([127.0.0.1]:57761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wj2r9-0007bB-HB for submit@debbugs.gnu.org; Sat, 10 May 2014 04:42:07 -0400 Original-Received: from mail-wi0-f179.google.com ([209.85.212.179]:34048) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wj2r5-0007ac-9J for 17446@debbugs.gnu.org; Sat, 10 May 2014 04:42:04 -0400 Original-Received: by mail-wi0-f179.google.com with SMTP id bs8so2366136wib.6 for <17446@debbugs.gnu.org>; Sat, 10 May 2014 01:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-type; bh=multSqwVmPmVDBnWh7qztiQK059g/w6siuEsJwkydB8=; b=F6cs6Losn1XEs5uUOi5K23A2j/Dq0zQhzObhRGKZEBCjtCdHwICG3uuAGPNLXCdD9s ZSphh73XOhSrSwMSAvNqMc/iplTO/Bm2NgoHdban+dvwqbKtPtPcxFda0sQsgG8MJDml +U2xxJlzI0h7g3jrV8coAvpUhV0KRFGbPjNTGmMBpn55f7KQcftegf2vsrQpvr5PvKZM 3+dqjJLAU2+56IUhSZC5rH8elHxv1YTf1pxt4WMy7E/JBG7iyLxjc9x7zWNX0klTdYU2 WlQsTw1RwnEJWBxslkokkL7zizKlgy+xYiqMBBpmFYIJC/XeXv5r7OOGVSqVzzlTtkgM IPsw== X-Received: by 10.194.189.116 with SMTP id gh20mr12207752wjc.41.1399711317486; Sat, 10 May 2014 01:41:57 -0700 (PDT) Original-Received: from dell-14z (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPSA id ek4sm3538442wib.9.2014.05.10.01.41.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 10 May 2014 01:41:55 -0700 (PDT) User-agent: mu4e 0.9.9.6pre3; emacs 24.4.50.1 In-reply-to: <87y4ya6pzx.fsf@web.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88854 Archived-At: Michael Heerdegen writes: > Stefan Monnier writes: > >> BTW, for older Emacsen, you can probably use a hack along the lines of >> the guaranteed 100% untested code below: > > I tried to make it work: > > (defun funcall-interactively (fun &rest args) > (setq fun (indirect-function fun)) > (call-interactively > (cond > ((consp fun) > (mapcar (lambda (x) > (if (eq (car-safe x) 'interactive) > `(interactive ',args) x)) > fun)) > ((byte-code-function-p fun) > (apply #'make-byte-code > (aref fun 0) > (aref fun 1) > (aref fun 2) > (aref fun 3) > (aref fun 4) > (aref fun 5) > args))))) > > Works at least with the count-words case: > > (funcall-interactively 'count-words nil nil) ==> something useful Great, works also with `count-words-region'. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997