fix: wrong-number-of-args error w/helpful on Emacs 29

help-fns--autoloaded-p's signature changed in 29, which helpful hasn't
adapted to yet. This temporary fix works around it while we wait.
This commit is contained in:
Henrik Lissner 2022-02-10 00:12:43 +01:00
parent fca870ee83
commit 2a7eee556f

View file

@ -554,7 +554,16 @@ files, so this replace calls to `pp' with the much faster `prin1'."
(button-type-put
var-bt 'action
(lambda (button)
(helpful-variable (button-get button 'apropos-symbol)))))))
(helpful-variable (button-get button 'apropos-symbol))))))
;; HACK `help-fns--autoloaded-p's signature changed on Emacs 29. This
;; suppressed the error until it is addressed upstream.
(when EMACS29+
(defadvice! doom--fix-helpful--autoloaded-p (fn &rest args)
:around #'helpful--autoloaded-p
(letf! (defun help-fns--autoloaded-p (sym _)
(funcall help-fns--autoloaded-p sym))
(apply fn args)))))
;;;###package imenu