flet macro was deprecated in Emacs 24.3 and replaced with two similar macros -
flet was used to temporarily override function definitions.
This was an analogue of a dynamically scoped
let that operates on the function
cell of symbols rather than their value cell.
The ability to dynamically rebind a functions was very useful for stubbing purposes in unit tests (you do write unit tests, don’t you?).
1 2 3
projectile-project-name are impure
functions (they depend on the current directory) and testing functions
that use them internally would normally be problematic. However,
gives us the ability to override their actual definitions in our
flet’s official replacement
cl-flet is lexically bound and this is no longer possible