1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-20 10:23:57 +00:00
Commit Graph

37 Commits

Author SHA1 Message Date
Stefan Monnier
35abd1e238 (ad-subr-arglist): Simplify. 2004-03-22 15:16:27 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Stefan Monnier
824c61ddc6 (ad-make-advised-docstring): Adjust usage for new help-add-fundoc-usage. 2003-05-06 13:58:30 +00:00
Stefan Monnier
24c22ecf5a (ad-get-enabled-advices, ad-special-forms)
(ad-arglist, ad-subr-arglist): Use push and match-string.
(ad-make-advised-docstring): Extract & reinsert the usage info.
2003-05-04 00:32:46 +00:00
Richard M. Stallman
004b6f61b3 (ad-compile-function): Disable cl-function warnings if cl is loaded. 2002-07-07 09:37:09 +00:00
Richard M. Stallman
bd421bc2dd (documentation): Add ad-define-subr-args call. 2002-04-30 04:20:25 +00:00
Richard M. Stallman
fe30e73fcd (ad-compile-function):
Byte compile the function under another (uninterned) name.
2001-12-11 06:07:07 +00:00
Sam Steingold
8a9463543d Converted backquote to the new style. 2001-11-27 15:52:52 +00:00
Gerd Moellmann
4033ae9d51 (ad-make-advised-definition): If the
original definition has an interactive form, but is Elp
instrumented, use the interactive form of the function called by
elp-wrapper.
2001-07-09 13:06:36 +00:00
Gerd Moellmann
8541c92408 (ad-make-advised-definition): Construct
advice for subrs differently.
2001-04-10 15:17:09 +00:00
Gerd Moellmann
e2b8a83076 (ad-make-advised-definition): Call
interactive-form to obtain the interactive spec of subrs.
2001-03-29 14:11:46 +00:00
Miles Bader
ef86085033 (ad-special-forms): Correct the conditional inclusion of `track-mouse'. 2000-11-21 08:49:33 +00:00
Stefan Monnier
571b4b9325 (ad-advice-class-completion-table)
(ad-make-freeze-definition): Don't quote lambda.
2000-06-12 04:59:26 +00:00
Dave Love
07c8b450a9 Fix last change. 1999-11-26 21:27:25 +00:00
Richard M. Stallman
850da9d092 Many doc fixes. 1999-11-26 17:46:05 +00:00
Gerd Moellmann
17d28a2aa8 (ad-activate-on): Make it an alias for ad-activate. 1999-10-30 20:26:22 +00:00
Dave Love
fce4437307 Doc fixes.
(ad-lemacs-p): Removed.
(advice): Add :link to defgroup.
1999-10-27 11:59:45 +00:00
Gerd Moellmann
5f6bb68adf (ad-activate-internal): Renamed from
ad-activate.  All callers changed, including those in data.c.
(ad-activate-internal-off): Renamed from ad-activate-off.
All uses changed.
(ad-activate): Renamed from ad-activate-on.  All uses changed.
(ad-start-advice, ad-stop-advice, ad-recover-normality):
Alter the definition of ad-activate-internal, not ad-activate.
1999-10-26 23:27:31 +00:00
Karl Heuer
65a44e9fc0 (ad-special-forms): Use track-mouse iff bound. 1999-08-14 03:55:01 +00:00
Dave Love
8bae7480b8 (ad-make-single-advice-docstring): Treat case with no doctring specially. 1999-08-10 09:51:17 +00:00
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