benchmark-init-el
benchmark-init-el copied to clipboard
Extra parameter for define-obsolete-function-alias
Hi:
Recent changes in define-obsolete-function-alias requires an extra parameter to indicate the obsoletion time.
Indeed, for now I use this incantation, but it's inelegant so hopefully temporary
(there's a pull already, since it's a simple change hopefully it gets merged soon):
(cl-letf (((symbol-function 'define-obsolete-function-alias) #'defalias))
(use-package benchmark-init
:config
(require 'benchmark-init-modes) ; explicitly required
(add-hook 'after-init-hook #'benchmark-init/deactivate)))
Or try this advice
from @yangsheng6810
(define-advice define-obsolete-function-alias (:filter-args (ll) fix-obsolete)
(let ((obsolete-name (pop ll))
(current-name (pop ll))
(when (if ll (pop ll) "1"))
(docstring (if ll (pop ll) nil)))
(list obsolete-name current-name when docstring)))