From 2a7eee556fb4af0ed8cfc9daf2bc6c78348ae8ca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 10 Feb 2022 00:12:43 +0100 Subject: [PATCH] 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. --- core/core-editor.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index 9985b052f..0fb144cfd 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -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