1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

17 Commits

Author SHA1 Message Date
Karl Heuer
863312cda6 Comment fix. 1999-06-22 22:46:17 +00:00
Andreas Schwab
9d52160a5c (ad-special-forms): Add save-current-buffer
and track-mouse.
1998-12-28 10:10:22 +00:00
Andreas Schwab
db352ce60e (ad-redefinition-action,
ad-default-compilation-action): Use `other' widget type.
1998-06-24 08:58:39 +00:00
Richard M. Stallman
2036d16f51 (ad-handle-definition, defadvice): Fix error messages. 1998-05-14 05:39:59 +00:00
Stephen Eglen
666b94132b Customized. 1998-04-05 18:26:32 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Richard M. Stallman
c0d7987107 Comment change. 1995-03-16 04:37:48 +00:00
Richard M. Stallman
81eee8abb0 (ad-subr-arglist): Adapted to new DOC file format. 1994-08-05 05:31:36 +00:00
Richard M. Stallman
fabaa9b58e New handling of automatic advice activation that
exploits modified built-in versions of `fset' and `defalias' which
take care of this functionality directly:
(ad-start-advice-on-load, ad-activate-on-definition)
(ad-definition-hooks, ad-enable-definition-hooks, ad-defined-function)
(ad-advised-definers, ad-advised-byte-compilers, byte-constant)
(byte-constant-limit, byte-constant2, byte-fset)
(ad-byte-code-fset-regexp): Variables deleted.
(ad-activate-defined-function, ad-find-fset-in-byte-code)
(ad-scan-byte-code-for-fsets, ad-advised-byte-code)
(ad-recover-byte-code, ad-enable-definition-hooks)
(ad-disable-definition-hooks): Functions deleted.
(defun, defmacro, fset, defalias, define-function)
(byte-compile-from-buffer, byte-compile-top-level): Removed `defadvice'
for these functions.
(ad-save-real-definitions): Removed saving of `byte-code'.
(ad-activate-off): New dummy function.
(ad-activate-on): New name for `ad-activate'.  All calls changed.
(ad-with-auto-activation-disabled): New macro prevents automatic
advice activation.
(ad-safe-fset): New function, used instead of `ad-real-fset'.
(ad-compile-function): Disable automatic advice activation while
compiling, because `byte-compile' uses `fset'.
(ad-activate-on): Renamed from `ad-activate'.  Avoid recursive calls.
(ad-activate-on-top-level): New variable.
(ad-start-advice, ad-stop-advice, ad-recover-normality): Modified to
achieve de/activation of automatic advice activation by setting the
definition of `ad-activate' to `ad-activate-on' or `ad-activate-off'.
(ad-start-advice): Is now called unconditionally when Advice is loaded.

Made compilation behavior of advised definitions customizable, since
loading the byte-compiler takes some time and is not always worth the
cost, e.g., if one only wants to make a few simple modifications:
(ad-default-compilation-action): New variable which specifies whether
to compile an advised definition in case the COMPILE argument to
`ad-activate-on' or one of its friends was supplied as nil.
(ad-preactivate-advice): Supply negative COMPILE argument to prevent
compilation.
(ad-should-compile): New function.
(ad-activate-advised-definition): Use `ad-should-compile' to determine
whether an advised definition should get compiled.
(ad-activate-on, ad-update, ad-activate-regexp, ad-update-regexp)
(ad-activate-all): Doc fixes.
(ad-update): Leave handling of COMPILE up to `ad-activate-on'.

Extracted construction of freeze-advices from `defadvice':
(ad-make-freeze-definition): New function.
(defadvice): Use `ad-make-freeze-definition' to construct frozen defs.
1994-08-04 21:40:49 +00:00
Richard M. Stallman
f643a89157 (byte-compile-from-buffer, byte-compile-top-level):
Removed advice. Byte-compilation problem is now taken care of
directly by the compiler.
(ad-advised-byte-compilers): Removed.
(ad-enable-definition-hooks, ad-disable-definition-hooks): Removed
activation of the advised byte-compiler entry points.
(ad-lemacs-p): Removed variable.
(ad-lemacs-p): New macro for compile-time conditionalization.
1994-02-25 00:57:37 +00:00
Richard M. Stallman
6e2f6f4518 Removed all support for Emacs-18:
Removed autoload for `backquote'.
Removed arglist specifications for `documentation' and `fset'.
(ad-emacs19-p, ad-use-jwz-compiler): Removed these variables.
(ad-lemacs-p, ad-v19-compiled-p, ad-subr-arglist,
ad-make-advised-docstring): Removed reference to `ad-emacs19-p'.
(ad-compiled-p): Renamed from `ad-v19-compiled-p'.  Removed old
definition of `ad-compiled-p'.
(ad-compiled-code): Renamed from `ad-v19-compiled-code'.
(ad-arglists, ad-docstring, ad-interactive-form): Use new names.
(ad-body-forms): Always return nil for compiled definitions.
(ad-compile-function): Simplified, because the v19 incarnation of
`byte-compile' can compile macros.
(ad-real-byte-codify): Removed.
(ad-execute-defadvices): Removed. The `defadvice's it contained
are now at the top level.
(ad-advised-byte-code-definition): Renamed to `ad-advised-byte-code'
and removed the definition of `ad-advised-byte-code' via `fset'.
(ad-advised-byte-code-definition, ad-recover-byte-code,
ad-stop-advice, ad-recover-normality): Removed
`ad-real-byte-codify'-cation of their definitions.
(ad-adjust-stack-sizes): Removed.
(ad-enable-definition-hooks, ad-disable-definition-hooks):
Removed v19 conditionalization.

Fixed the problematic interaction between the
byte-compiler and Advice when `ad-activate-on-definition' was t which
resulted in erroneous compilation of nested `defun/defmacro's:
(byte-compile-from-buffer, byte-compile-top-level): Advised
to temporarily deactivate the advice of `defun/defmacro'.
(ad-advised-definers, ad-advised-byte-compilers): New variables.
(ad-enable-definition-hooks, ad-disable-definition-hooks):
En/disable the advised byte-compiler entry points.

(defadvice): Implement a `freeze' option which expands
the `defadvice' into a redefining and dumpable `defun/defmacro'
whose documentation can be written to the `DOC' file. Frozen
advices cannot be undone, hence, they do not need any Advice
runtime support.
(ad-defadvice-flags): Add `freeze' flag.
(ad-make-advised-docstring, ad-make-single-advice-docstring):
New STYLE option for `plain' and `freeze' styles. Slightly
changed the default formatting of advised docstrings.
(ad-make-plain-docstring, ad-make-freeze-docstring): New functions.

(ad-recover-all, ad-scan-byte-code-for-fsets):
Removed unused condition variable `ignore-errors'.

(ad-save-real-definition): New macro to save real
definitions of functions used by Advice.
Use `ad-save-real-definition' to save definitions of `fset',
`byte-code' and now also `documentation'.
(ad-subr-arglist, ad-docstring, ad-make-advised-docstring):
Use `ad-real-documentation' to avoid interference with the
advised version of `documentation'.

(ad-execute-defadvices): Copy advice infos.

(ad-start-advice-on-load): Default changed to t.
1994-02-23 03:57:07 +00:00
Karl Heuer
835cd48e6a (ad-execute-defadvices): Don't allocate advice-infos in pure space, in case we
want to preload this file.
1994-02-02 21:35:07 +00:00
Richard M. Stallman
b7f66977be Comment change. 1993-11-23 20:12:25 +00:00
Richard M. Stallman
4e08e74182 Comment change. 1993-11-23 19:28:39 +00:00
Brian Fox
5ed74a2240 Doc fix. 1993-10-05 01:54:20 +00:00
Roland McGrath
de0748e009 (ad-start-advice-on-load): Initialize to t. 1993-07-16 19:53:38 +00:00
Roland McGrath
ee7bf2ad24 Initial revision 1993-07-16 19:50:55 +00:00