[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp ad5a2bb 1/7: Revert "Add `advice-flet' macro"
From: |
Andrea Corallo |
Subject: |
feature/native-comp ad5a2bb 1/7: Revert "Add `advice-flet' macro" |
Date: |
Tue, 6 Oct 2020 12:37:42 -0400 (EDT) |
branch: feature/native-comp
commit ad5a2bbde071138cacadd19b95f2638741fd5d8d
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Revert "Add `advice-flet' macro"
This reverts commit d07d7ab1a0e321ced62ebe5dd9db27eb7e93430e.
---
lisp/emacs-lisp/nadvice.el | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index 21da038..5b3aa70 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -356,32 +356,6 @@ of the piece of advice."
(macroexp-let2 nil new `(advice--remove-function ,getter ,function)
`(unless (eq ,new ,getter) ,(funcall setter new)))))
-;;;###autoload
-(defmacro advice-flet (bindings &rest body)
- ;; FIXME add doc.
- (declare (indent 1))
- (let ((let-binds ())
- (ad-add ())
- (ad-del ()))
- (dolist (bind bindings)
- (let* ((fun-name (car bind))
- (fun (cadr bind))
- (tmp-sym (gensym (symbol-name fun-name))))
- (push `(,tmp-sym ,fun) let-binds)
- (push `(advice-add #',fun-name
- ,(if (= (length bind) 3)
- (nth 2 bind)
- :override)
- ,tmp-sym)
- ad-add)
- (push `(advice-remove #',fun-name ,tmp-sym) ad-del)))
- `(let ,(reverse let-binds)
- (unwind-protect
- (progn
- ,@(reverse ad-add)
- ,@body)
- ,@(reverse ad-del)))))
-
(defun advice-function-mapc (f function-def)
"Apply F to every advice function in FUNCTION-DEF.
F is called with two arguments: the function that was added, and the
- feature/native-comp updated (3232000 -> 4a1bb46), Andrea Corallo, 2020/10/06
- feature/native-comp ad5a2bb 1/7: Revert "Add `advice-flet' macro",
Andrea Corallo <=
- feature/native-comp f43dbe6 5/7: Add a test for primitive redefinition, Andrea Corallo, 2020/10/06
- feature/native-comp 4a1bb46 7/7: * Native compiling do not target a directory with no write permission, Andrea Corallo, 2020/10/06
- feature/native-comp 0b58be4 3/7: Rename comp-subr-safe-advice -> comp-subr-trampoline-install, Andrea Corallo, 2020/10/06
- feature/native-comp b3ade4d 2/7: Revert "Use `advice-flet' in place of `cl-letf' to avoid primitive..., Andrea Corallo, 2020/10/06
- feature/native-comp 87c6aa1 4/7: Make primitive redefinition effective through trampoline synthesis, Andrea Corallo, 2020/10/06
- feature/native-comp 29f7024 6/7: * Fix a test in test/lisp/subr-tests.el, Andrea Corallo, 2020/10/06