emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src ChangeLog eval.c


From: Chong Yidong
Subject: [Emacs-diffs] emacs/src ChangeLog eval.c
Date: Sat, 15 Aug 2009 21:51:35 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/08/15 21:51:35

Modified files:
        src            : ChangeLog eval.c 

Log message:
        * eval.c (Fcalled_interactively_p, Finteractive_p): Doc
        fix (Bug#3936).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7688&r2=1.7689
http://cvs.savannah.gnu.org/viewcvs/emacs/src/eval.c?cvsroot=emacs&r1=1.311&r2=1.312

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7688
retrieving revision 1.7689
diff -u -b -r1.7688 -r1.7689
--- ChangeLog   15 Aug 2009 18:31:49 -0000      1.7688
+++ ChangeLog   15 Aug 2009 21:51:33 -0000      1.7689
@@ -9,6 +9,9 @@
 
 2009-08-15  Chong Yidong  <address@hidden>
 
+       * eval.c (Fcalled_interactively_p, Finteractive_p): Doc
+       fix (Bug#3936).
+
        * xdisp.c (pop_it): Don't pop into a display vector (Bug#4131).
 
        * buffer.c (set_buffer_internal_1)

Index: eval.c
===================================================================
RCS file: /sources/emacs/emacs/src/eval.c,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -b -r1.311 -r1.312
--- eval.c      27 Jul 2009 02:02:49 -0000      1.311
+++ eval.c      15 Aug 2009 21:51:35 -0000      1.312
@@ -586,10 +586,10 @@
 
 
 DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0,
-       doc: /* Return t if the function was run directly by user input.
+       doc: /* 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 in keyboard macro),
+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
@@ -598,10 +598,10 @@
 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.)  */)
+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'.  */)
      ()
 {
   return (INTERACTIVE && interactive_p (1)) ? Qt : Qnil;
@@ -609,14 +609,15 @@
 
 
 DEFUN ("called-interactively-p", Fcalled_interactively_p, 
Scalled_interactively_p, 0, 0, 0,
-       doc: /* Return t if it is in a function 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' 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.)  */)
+       doc: /* Return t if the containing function was called by 
`call-interactively'.
+This includes being called as the binding of a key, or called from a
+keyboard macro (unlike `interactive-p').
+
+This function is meant for implementing advice and other
+function-modifying features.  Instead of using this, it is sometimes
+cleaner to give your function an extra optional argument whose
+`interactive' spec specifies non-nil unconditionally (\"p\" is a good
+way to do this).  */)
      ()
 {
   return interactive_p (1) ? Qt : Qnil;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]