[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3984:
From: |
Stefan Monnier |
Subject: |
bug#3984: |
Date: |
Fri, 20 Sep 2013 10:54:05 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Ok, I have written a couple of tests, two of which are currently failing
> (mine are the ones with numbered suffixes 2 through 5). I am
> attaching a patch that adds these tests. ERT output is below:
Thanks. Just a few questions, before installing the patch.
> +(defun clear-advice (symbol)
> + "Reset SYMBOL's function to its original unadvised definition."
> + (let ((func (symbol-function symbol)))
> + (while (advice--p func)
> + (setq func (advice--cdr func)))
> + (fset symbol func)))
Why do you need that? AFAICT you only use it after defining sm-test7.2,
and I don't see why that call is needed.
> +(defmacro post-restore-func (func &rest body)
> + (let ((fdef (symbol-function func)))
> + `(unwind-protect
> + (progn ,@body)
> + (fset ',func ,fdef))))
> +(put 'post-restore-func 'lisp-indent-function
> + (get 'prog1 'lisp-indent-function))
Since it's only used once, I don't think it's worth defining a macro for it.
Stefan
- bug#3984:, (continued)
- bug#3984:, Stefan Monnier, 2013/09/18
- bug#3984:, Ryan, 2013/09/19
- bug#3984:, Ryan, 2013/09/19
- bug#3984:, Ryan, 2013/09/19
- bug#3984:, Ryan, 2013/09/20
- bug#3984: Fix case where call-interactively is advised, Ryan, 2013/09/20
- bug#3984:, Ryan, 2013/09/20
- bug#3984:, Stefan Monnier, 2013/09/20
- bug#3984:, Ryan, 2013/09/20
- bug#3984:, Ryan, 2013/09/20
- bug#3984:,
Stefan Monnier <=
- bug#3984:, Ryan, 2013/09/20
- bug#3984:, Stefan Monnier, 2013/09/20
- bug#3984:, Stefan Monnier, 2013/09/24