Questions tagged [monkey-patching]
The monkey-patching tag has no usage guidance.
5
questions
5
votes
2
answers
281
views
Shallowly override functions within a target function
I'm exploring options for monkey-patching and I'm wondering if the following is within reason.
I would like to override a particular function within some target function so that calls within the ...
3
votes
1
answer
356
views
How do I temporarily mock a function for testing?
I'd like to patch some elisp functions inside my unit tests. I've tried cl-labels and cl-flet, but neither achieve the result I want:
(defun return-number ()
1)
(defun calls-return-number ()
(...
2
votes
1
answer
512
views
Workaround for "Invalid search bound (wrong side of point)" in CC Mode
Emacs 24.x and 25.x have a bug in CC Mode which can result in some operations failing with the error
Invalid search bound (wrong side of point)
For example, I can reproduce it with the following ...
0
votes
2
answers
146
views
How do you do runtime code swapping?
Does elisp have the "runtime code swapping" feature?
mentioned in slide at 27:14
https://www.youtube.com/watch?v=3TlEqzptWr0&t=27m14s
Hot code loading is the art of replacing an engine ...
0
votes
2
answers
100
views
Any way to access a lexical let variable outside of the let?
I need to retrieve a local, lexical, runtime variable from a function, but I'm unable to modify the function to return it because it is from an external library. The variable I'm unable to reach is ...