From d6d7b3a450538a7cd668a1dc240986b8ca70f351 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 7 Feb 2022 22:40:26 +0000 Subject: [PATCH] fix(docs/helpful): add workarounds for recent Emacs 29.x issues There's been a couple of recent changes in Emacs' master branch which has affected the helpful package. These changes work around both issues, and seems to let helpful keep working as before. --- modules/documentation/siren-helpful.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/documentation/siren-helpful.el b/modules/documentation/siren-helpful.el index 80a57e2..c1402b5 100644 --- a/modules/documentation/siren-helpful.el +++ b/modules/documentation/siren-helpful.el @@ -18,7 +18,21 @@ :custom (helm-describe-function-function 'helpful-function) - (helm-describe-variable-function 'helpful-variable)) + (helm-describe-variable-function 'helpful-variable) + + :config + ;; TODO: Follow up on this workaround for the removal of the + ;; `read-symbol-positions-list' variable in Emacs 29.x. More details: + ;; https://github.com/Wilfred/elisp-refs/issues/35 + (when (not (version< emacs-version "29.0")) + (defvar read-symbol-positions-list nil)) + + ;; TODO: Follow up this workaround required due to `help-fns--autoloaded-p' + ;; being changed to only accept a single argument in Emacs 29.x in commit: + ;; https://github.com/emacs-mirror/emacs/commit/1d1b664fbb9232aa40d8daa54a689cfd63d38aa9 + (defun helpful--autoloaded-p (sym _buf) + "Return non-nil if function SYM is autoloaded." + (help-fns--autoloaded-p sym))) (provide 'siren-helpful) ;;; siren-helpful.el ends here