From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59098 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: interactive-p Date: Thu, 11 Nov 2004 13:00:33 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100145698 26861 80.91.229.6 (11 Nov 2004 04:01:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2004 04:01:38 +0000 (UTC) Cc: rms@gnu.org, ding@gnus.org Original-X-From: ding-owner+M7641@lists.math.uh.edu Thu Nov 11 05:01:24 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CS69D-0004iH-00 for ; Thu, 11 Nov 2004 05:01:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CS68l-00083c-00; Wed, 10 Nov 2004 22:00:55 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CS68d-00083U-00 for ding@lists.math.uh.edu; Wed, 10 Nov 2004 22:00:47 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CS68Z-0006ym-12 for ding@lists.math.uh.edu; Wed, 10 Nov 2004 22:00:43 -0600 Original-Received: from washington.hostforweb.net (washington.hostforweb.net [69.61.11.2]) by justine.libertine.org (Postfix) with ESMTP id 78A813A01EF; Wed, 10 Nov 2004 22:00:39 -0600 (CST) Original-Received: from localhost ([127.0.0.1]) by washington.hostforweb.net with esmtpa (Exim 4.42) id 1CS68a-0000zP-I2; Wed, 10 Nov 2004 23:00:44 -0500 Original-To: larsi@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:/eht8eKGL32AubcvVgq5MaPnDy8= X-Hashcash: 1:17:041111:larsi@gnus.org::pPGPU5cXtyWNkPZR:00000000000000000000000000000000000000000000000019g X-Hashcash: 1:17:041111:rms@gnu.org::ZDcHU91FKz1h59kv:0000002CUI X-Hashcash: 1:17:041111:ding@gnus.org::52Rw8zfCLbFnC4vf:00000Zec X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59098 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59098 >>>>> In Richard Stallman wrote: > I'm not quite sure what counts as bad uses. Functions that change > their behavior surprisingly based on whether they're called > interactively or not? > Please look at the latest commands.texi; it explains what is good > and bad usage of interactive-p. I updated it a week ago. The "Interective Call" section of the Elisp manual mentions a good example. We've fixed bad usages of interactive-p in the emacs-w3m modules about two years ago. At that time, TSUCHIYA Masatoshi showed another example as follows: (defun foo () (interactive) (message (if (interactive-p) "Interactrive" "Non Interactrive"))) (let ((ad-default-compilation-action 'never)) (defadvice foo (around foo-wrapper activate) ad-do-it)) (symbol-function 'foo) => (lambda nil "$ad-doc: foo$" (interactive) (let (ad-return-value) (setq ad-return-value (ad-Orig-foo)) ad-return-value)) Because of this, the foo command will never say "Interactrive".