[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispref/advice.texi
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lispref/advice.texi |
Date: |
Tue, 24 Jun 2003 14:14:01 -0400 |
Index: emacs/lispref/advice.texi
diff -c emacs/lispref/advice.texi:1.14 emacs/lispref/advice.texi:1.15
*** emacs/lispref/advice.texi:1.14 Tue Feb 4 09:47:52 2003
--- emacs/lispref/advice.texi Tue Jun 24 14:14:01 2003
***************
*** 36,42 ****
* Preactivation:: Preactivation is a way of speeding up the
loading of compiled advice.
* Argument Access in Advice:: How advice can access the function's arguments.
! * Subr Arguments:: Accessing arguments when advising a primitive.
* Combined Definition:: How advice is implemented.
@end menu
--- 36,42 ----
* Preactivation:: Preactivation is a way of speeding up the
loading of compiled advice.
* Argument Access in Advice:: How advice can access the function's arguments.
! * Advising Primitives:: Accessing arguments when advising a primitive.
* Combined Definition:: How advice is implemented.
@end menu
***************
*** 656,671 ****
These argument constructs are not really implemented as Lisp macros.
Instead they are implemented specially by the advice mechanism.
! @node Subr Arguments
! @section Definition of Subr Argument Lists
! When the advice facility constructs the combined definition, it needs
! to know the argument list of the original function. This is not always
! possible for primitive functions. When advice cannot determine the
! argument list, it uses @code{(&rest ad-subr-args)}, which always works
! but is inefficient because it constructs a list of the argument values.
! You can use @code{ad-define-subr-args} to declare the proper argument
! names for a primitive function:
@defun ad-define-subr-args function arglist
This function specifies that @var{arglist} should be used as the
--- 656,678 ----
These argument constructs are not really implemented as Lisp macros.
Instead they are implemented specially by the advice mechanism.
! @node Advising Primitives
! @section Advising Primitives
! Advising a primitive function (also called a ``subr'') is risky.
! Some primitive functions are used by the advice mechanism; advising
! them could cause an infinite recursion. Also, many primitive
! functions are called directly from C code. Calls to the primitive
! from Lisp code will take note of the advice, but calls from C code
! will ignore the advice.
!
! When the advice facility constructs the combined definition, it needs
! to know the argument list of the original function. This is not
! always possible for primitive functions. When advice cannot determine
! the argument list, it uses @code{(&rest ad-subr-args)}, which always
! works but is inefficient because it constructs a list of the argument
! values. You can use @code{ad-define-subr-args} to declare the proper
! argument names for a primitive function:
@defun ad-define-subr-args function arglist
This function specifies that @var{arglist} should be used as the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lispref/advice.texi,
Richard M. Stallman <=