Some elisp functions that I have installed generate warnings:
`flet\' is an obsolete macro (as of 24.3); use either `cl-flet\' or `cl-letf\'.
flet isn't the same as either cl-flet or cl-letf.
It's more dangerous (and maybe more powerful). That's why it's being deprecated.
Since it's different (binds dynamically a function name), you have to think
in each case if it's appropriate to replace it with cl-flet.
flet can't be replaced with cl-flet(defun adder (a b)
(+ a b))
(defun add-bunch (&rest lst)
(reduce #'adder lst))
(add-bunch 1 2 3 4)
;; 10
(flet ((adder (a b) (* a b)))
(add-bunch 1 2 3 4))
;; 24
(cl-flet ((adder (a b) (* a b)))
(add-bunch 1 2 3 4))
;; 10
Note that cl-flet does lexical binding, so the behavior of adder isn't changed,
while flet does dynamic binding, which makes add-bunch temporarily produce a factorial.