From c5cde97ba3a28f3a55a6584c78a7455712a77825 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Mon, 29 May 2017 01:04:41 +0100 Subject: [PATCH] Add suggestion to docstring * lisp/subr.el (interactive-p): Mention commandp, as this is often what users are actually looking for. --- lisp/subr.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 8d5d2a779c6..0dce02de8ba 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4649,7 +4649,10 @@ 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'." +use `called-interactively-p'. + +To test whether a function can be called interactively, use +`commandp'." (declare (obsolete called-interactively-p "23.2")) (called-interactively-p 'interactive)) -- 2.39.2