Subject: fix incompatible arity change help-fns

From: Ben Schw <[email-masked]>
Date: Sun, 20 Feb 2022 16:58:28 +0100

Tags: patch

See commit message

In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.31,
cairo version 1.17.4)
 of 2022-02-19 built on benj-pc
Repository revision: e015dc77f5e38d52bb0b328c764c8186c8c9bf73
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Manjaro Linux

Configured using:
 'configure --with-mailutils --with-native-compilation'
From c6b60dbc23b045902ac2d493b318d8e2c791b289 Mon Sep 17 00:00:00 2001
From: Benj <[email-masked]>
Date: Sun, 20 Feb 2022 15:23:11 +0100
Subject: [PATCH] help-fns.el (help-fns--autoloaded-p) do not brake callers

A recent change changed the arity of this function, braking
callers that pass 2 arguments.

This function was called from the excellent package helpful.el
which throws a lisp error now

(defun helpful--autoloaded-p (sym buf)
  "Return non-nil if function SYM is autoloaded."
  (-when-let (file-name (buffer-file-name buf))
    (setq file-name (s-chop-suffix ".gz" file-name))
    (help-fns--autoloaded-p sym file-name)))
---
 lisp/help-fns.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 80d7d5cb02..bd38433379 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -688,7 +688,7 @@ help-fns--globalized-minor-mode
     (terpri)))
 
 ;; We could use `symbol-file' but this is a wee bit more efficient.
-(defun help-fns--autoloaded-p (function)
+(defun help-fns--autoloaded-p (function &optional _)
   "Return non-nil if FUNCTION has previously been autoloaded."
   (seq-some #'autoloadp (get function 'function-history)))
 
-- 
2.35.1