Currently, I have this code:
(defalias 'hydra-set-transient-map
(if (fboundp 'set-transient-map)
'set-transient-map
(lambda (map keep-pred &optional on-exit)
(set-temporary-overlay-map map (hydra--pred on-exit)))))
It uses the newer set-transient-map
that obsoletes set-temporary-overlay-map
when it's
available, however I still want the package to work for Emacs versions that don't have
set-transient-map
. And I'm getting this warning when byte compiling:
set-temporary-overlay-map is an obsolete function (as of 24.4); use set-transient-map instead.
What's the proper procedure to avoid the warning in this case, without ignoring a whole class of warnings?