[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 26e2ded 222/340: Rename some innacurate referenc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 26e2ded 222/340: Rename some innacurate references to "fake" functions |
Date: |
Thu, 16 Dec 2021 14:59:38 -0500 (EST) |
branch: elpa/buttercup
commit 26e2dedb3558954ed5429753e39c028c43d5b63a
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>
Rename some innacurate references to "fake" functions
The "buttercup--spy-on-and-call-fake" function and its argument
"fake-function" were misnomers, since they were used for all
replacement functions including ones that called the original
function (i.e. not fakes). They have now been renamed.
---
buttercup.el | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index 18b313d..ba5c203 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1094,32 +1094,32 @@ responsibility to ensure ARG is a command."
nil))
(_
(error "Invalid `spy-on' keyword: `%S'" keyword)))))
- (buttercup--spy-on-and-call-fake symbol replacement)))
+ (buttercup--spy-on-and-call-replacement symbol replacement)))
-(defun buttercup--spy-on-and-call-fake (spy fake-function)
- "Replace the function in symbol SPY with a spy calling FAKE-FUNCTION."
+(defun buttercup--spy-on-and-call-replacement (spy fun)
+ "Replace the function in symbol SPY with a spy calling FUN."
(let ((orig-function (symbol-function spy)))
- (fset spy (buttercup--make-spy fake-function))
+ (fset spy (buttercup--make-spy fun))
(buttercup--add-cleanup (lambda ()
(fset spy orig-function)))))
-(defun buttercup--make-spy (fake-function)
- "Create a new spy function wrapping FAKE-FUNCTION and tracking calls to
itself."
+(defun buttercup--make-spy (fun)
+ "Create a new spy function wrapping FUN and tracking calls to itself."
(let (this-spy-function)
(setq this-spy-function
(lambda (&rest args)
- (let ((return-value (apply fake-function args)))
+ (let ((return-value (apply fun args)))
(buttercup--spy-calls-add
this-spy-function
(make-spy-context :args args
:return-value return-value
:current-buffer (current-buffer)))
return-value)))
- ;; Add the interactive form from `fake-function', if any
- (when (interactive-form fake-function)
+ ;; Add the interactive form from `fun', if any
+ (when (interactive-form fun)
(setq this-spy-function
`(lambda (&rest args)
- ,(interactive-form fake-function)
+ ,(interactive-form fun)
(apply ',this-spy-function args))))
this-spy-function))
- [nongnu] elpa/buttercup 4106adc 170/340: Add release script, (continued)
- [nongnu] elpa/buttercup 4106adc 170/340: Add release script, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9b6cc79 177/340: travis: Test on 26.1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0d742b0 187/340: Set failure-description for pending specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1c50a80 196/340: Fix the buttercup-run tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 810fa6f 197/340: Bump version: 1.15 → 1.16, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4459f37 199/340: Add test for :var* argument, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ff16814 216/340: travis: Always test on xenial, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bd851d4 217/340: Merge pull request #155 from snogge/travis-xenial, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 246ddd7 218/340: Merge pull request #152 from DarwinAwardWinner/suppress-warning-redirect, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9408a72 220/340: Merge pull request #154 from DarwinAwardWinner/test-emacs-26.3, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 26e2ded 222/340: Rename some innacurate references to "fake" functions,
ELPA Syncer <=
- [nongnu] elpa/buttercup 9b87afc 234/340: Merge branch 'snogge/spy-context-tweaks', ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d8b596c 240/340: Merge branch 'doc-improve', ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 243b71f 245/340: Merge branch 'spy-scope-error', ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f3c2b00 261/340: test: Move with-local-buttercup to top of file, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0dbd474 263/340: Bump version: 1.20 → 1.21, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1c9c82f 265/340: Fixed misspelling in the documentation, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 360953b 266/340: test: Only run tests found in the tests/ directory, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 25bc00d 273/340: test: Set up suite "The batch reporter" to use fake terminal, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 5c9f80d 279/340: test: Add color tests for buttercup-suite-started and -done, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2be9ad3 280/340: test: Add color tests for spec-done, ELPA Syncer, 2021/12/16