* lisp/emacs-lisp/nadvice.el: New package.
commit231d8498eb1a10fadf7a4cd860cc934e05516433
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Nov 2012 20:43:43 +0000 (12 15:43 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Nov 2012 20:43:43 +0000 (12 15:43 -0500)
tree91b3cac4bf733674c999b4d8acbc8f6d272f7736
parentbe49ba7461368989e0a8ac7d1f555d2f042e8c52
* lisp/emacs-lisp/nadvice.el: New package.
* lisp/subr.el (special-form-p): New function.
* lisp/emacs-lisp/elp.el: Use lexical-binding and advice-add.
(elp-all-instrumented-list): Remove var.
(elp-not-profilable): Remove elp-wrapper.
(elp-profilable-p): Use autoloadp and special-form-p.
(elp--advice-name): New const.
(elp-instrument-function): Use advice-add.
(elp--instrumented-p): New predicate.
(elp-restore-function): Use advice-remove.
(elp-restore-all, elp-reset-all): Use mapatoms.
(elp-set-master): Use elp--instrumented-p.
(elp--make-wrapper): Rename from elp-wrapper, return a function
suitable for advice-add.  Use cl-inf.
(elp-results): Use mapatoms+elp--instrumented-p.
* lisp/emacs-lisp/debug.el: Use lexical-binding and advice-add.
(debug-function-list): Remove var.
(debug): Rename arg, and then let-bind it explicitly inside.
(debugger-setup-buffer): Rename arg.
(debugger-setup-buffer): Adjust counts to new debug-on-entry setup.
(debugger-frame-number): Adjust to new debug-on-entry setup.
(debug--implement-debug-on-entry): Rename from
implement-debug-on-entry, add argument.
(debugger-special-form-p): Remove, use special-form-p instead.
(debug-on-entry): Use advice-add.
(debug--function-list): New function.
(cancel-debug-on-entry): Use it, along with advice-remove.
(debug-arglist, debug-convert-byte-code, debug-on-entry-1): Remove.
(debugger-list-functions): Use debug--function-list instead of
debug-function-list.
* lisp/emacs-lisp/advice.el (ad-save-real-definition): Remove, unused.
(ad-special-form-p): Remove, use special-form-p instead.
(ad-set-advice-info): Use add-function and remove-function.
(ad--defalias-fset): Adjust accordingly.
* test/automated/advice-tests.el: New tests.
etc/NEWS
lisp/ChangeLog
lisp/emacs-lisp/advice.el
lisp/emacs-lisp/debug.el
lisp/emacs-lisp/elp.el
lisp/emacs-lisp/nadvice.el [new file with mode: 0644]
lisp/subr.el
test/ChangeLog
test/automated/advice-tests.el [new file with mode: 0644]