From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Suggest: dont declare interactive-p obsolete Date: Wed, 18 Nov 2015 17:57:49 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447898303 6907 80.91.229.3 (19 Nov 2015 01:58:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2015 01:58:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 02:58:13 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZzEUD-0002LQ-EJ for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2015 02:58:09 +0100 Original-Received: from localhost ([::1]:39113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzEUC-0000XA-MW for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2015 20:58:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzETz-0000WV-Rc for emacs-devel@gnu.org; Wed, 18 Nov 2015 20:57:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzETw-0002KQ-Kw for emacs-devel@gnu.org; Wed, 18 Nov 2015 20:57:55 -0500 Original-Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:32914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzETw-0002K2-EQ for emacs-devel@gnu.org; Wed, 18 Nov 2015 20:57:52 -0500 Original-Received: by pabfh17 with SMTP id fh17so65494573pab.0 for ; Wed, 18 Nov 2015 17:57:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=V6sb7OlUdxygWdIDajRYf2v9iUTsrZWfOtTEcDSMcYk=; b=jlcHNn7YphmUMA3JcIuG4xqz0fnjEJvL1u9M0gaZA+FVgrYLzkSa/JMM3I0UfDxOUB 8aMnHit9/qsOiO6tjnYwI+JiBhgI/NgzuBzim5GdW87qjZeWCMT0UB5sgUHyRQRUSyDo SzJBf+Oy/4SICzHOXAChIjFWJOL+JRznmG22xEuikDeXoWj7vk0VZBw9e6n4JpG0Xl4h RSgclwCQ+E6322Yg+mjmkkkWRbVbHUVRmcgyaqC2Ary4VX2e3HQL1br/s2M39ZPMji+r 9WqsDnHkMFnm/8gNmikBgvA63AEONS4wMIU53HYKs9VzaLI8GX2u/EIXDt5SG/YKqE2U OZ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-type; bh=V6sb7OlUdxygWdIDajRYf2v9iUTsrZWfOtTEcDSMcYk=; b=QuHUDhzdpDPUKXBTSjpXalS9DSo+XajZ87I0HBsVFGQro8EO/w2BirxCbQPaJozwhh Tmy+SswUk8y7Wts1rF9adortqEdtkk6+RELCTSffwZVfaX1JnSSgZXOGDyx/6AawaSx/ 2HU18FfgQdRgvjm3ayou9TCTQoj2RJ0CJNS29ow7jRpDEXDG3Q5f/CXDuap1/5U+GpSm WfzYMa/SwSzNoYqrP0689GeB7GyiSGGEk68UzL5vYm1McmlvIPNO5W1r5LHljGm2mudo 7yDgK+qGIvq2wvwxx70h/Fy5xouW8YvjAovB6Xb2PoW9S6j7CjnqUcT5t/sZKoMNETQC pKqA== X-Gm-Message-State: ALoCoQmAx9Gg7cZ5ruEfYVCnBXVW7HXQ6raj+GfJ/NsH7HtuYxM2KbdCWumenCQS06lRe+8qnGMG X-Received: by 10.66.141.73 with SMTP id rm9mr6795091pab.96.1447898271392; Wed, 18 Nov 2015 17:57:51 -0800 (PST) Original-Received: from raman-glaptop2 ([207.198.105.24]) by smtp.gmail.com with ESMTPSA id l9sm6624725pbq.43.2015.11.18.17.57.50 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 18 Nov 2015 17:57:50 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194765 Archived-At: This is a minor change -- that will let existing code run without warnings. If we turned the defun in subr.el to a defsubst and dropped the (declare (obsolete called-interactively-p "23.2")) (called-interactively-p 'interactive)) -- we'd lose nothing as far as I can tell, but eliminate the warning --- and keep code more readable -- (when (interactive-p)...) is arguably more readable than (when (called-interactively-p 'interactive) ...) At present subr.el defines: (defun interactive-p () "Return t if the containing function was run directly by user input. This means that the function was called with `call-interactively' \(which includes being called as the binding of a key) and input is currently coming from the keyboard (not a keyboard macro), and Emacs is not running in batch mode (`noninteractive' is nil). The only known proper use of `interactive-p' is in deciding whether to display a helpful message, or how to display it. If you're thinking of using it for any other purpose, it is quite likely that you're making a mistake. Think: what do you want to do when the command is called from a keyboard macro or in batch mode? To test whether your function was called with `call-interactively', either (i) add an extra optional argument and give it an `interactive' spec that specifies non-nil unconditionally (such as \"p\"); or (ii) use `called-interactively-p'." (declare (obsolete called-interactively-p "23.2")) (called-interactively-p 'interactive)) --