[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/eval.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/eval.c |
Date: |
Tue, 02 Nov 2004 04:17:44 -0500 |
Index: emacs/src/eval.c
diff -c emacs/src/eval.c:1.221 emacs/src/eval.c:1.222
*** emacs/src/eval.c:1.221 Thu Jul 29 01:41:36 2004
--- emacs/src/eval.c Tue Nov 2 08:59:26 2004
***************
*** 540,560 ****
DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0,
! doc: /* Return t if function in which this appears was called
interactively.
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 in keyboard macro). */)
()
{
! return interactive_p (1) ? Qt : Qnil;
}
! /* Return 1 if function in which this appears was called
! interactively. 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 in
! keyboard macro).
EXCLUDE_SUBRS_P non-zero means always return 0 if the function
called is a built-in. */
--- 540,584 ----
DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0,
! doc: /* Return t if the 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 in 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?
!
! If you want to test whether your function was called with
! `call-interactively', the way to do that is by adding an extra
! optional argument, and making the `interactive' spec specify non-nil
! unconditionally for that argument. (`p' is a good way to do this.) */)
()
{
! return (INTERACTIVE && interactive_p (1)) ? Qt : Qnil;
}
! DEFUN ("called-interactively-p", Fcall_interactive_p, Scall_interactive_p, 0,
0, 0,
! doc: /* Return t if the function using this was called with
call-interactively.
! This is used for implementing advice and other function-modifying
! features of Emacs.
!
! The cleanest way to test whether your function was called with
! `call-interactively', the way to do that is by adding an extra
! optional argument, and making the `interactive' spec specify non-nil
! unconditionally for that argument. (`p' is a good way to do this.) */)
! ()
! {
! return (INTERACTIVE && interactive_p (1)) ? Qt : Qnil;
! }
!
!
! /* Return 1 if function in which this appears was called using
! call-interactively.
EXCLUDE_SUBRS_P non-zero means always return 0 if the function
called is a built-in. */
***************
*** 566,574 ****
struct backtrace *btp;
Lisp_Object fun;
- if (!INTERACTIVE)
- return 0;
-
btp = backtrace_list;
/* If this isn't a byte-compiled function, there may be a frame at
--- 590,595 ----
***************
*** 1975,1981 ****
struct backtrace backtrace;
struct gcpro gcpro1, gcpro2, gcpro3;
! if (handling_signal)
abort ();
if (SYMBOLP (form))
--- 1996,2002 ----
struct backtrace backtrace;
struct gcpro gcpro1, gcpro2, gcpro3;
! if (handling_signal || INPUT_BLOCKED_P)
abort ();
if (SYMBOLP (form))
- [Emacs-diffs] Changes to emacs/src/eval.c,
Richard M . Stallman <=
- [Emacs-diffs] Changes to emacs/src/eval.c, Kim F . Storm, 2004/11/02
- [Emacs-diffs] Changes to emacs/src/eval.c, Jan Djärv, 2004/11/06
- [Emacs-diffs] Changes to emacs/src/eval.c, Thien-Thi Nguyen, 2004/11/20
- [Emacs-diffs] Changes to emacs/src/eval.c, Stefan Monnier, 2004/11/22
- [Emacs-diffs] Changes to emacs/src/eval.c, Eli Zaretskii, 2004/11/26