unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54071: fix incompatible arity change help-fns
@ 2022-02-20 15:58 Ben Schw
  2022-02-20 16:26 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Schw @ 2022-02-20 15:58 UTC (permalink / raw)
  To: 54071


[-- Attachment #1.1: Type: text/plain, Size: 435 bytes --]

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'

[-- Attachment #1.2: Type: text/html, Size: 650 bytes --]

[-- Attachment #2: 0001-help-fns.el-help-fns-autoloaded-p-do-not-brake-calle.patch --]
[-- Type: text/x-patch, Size: 1231 bytes --]

From c6b60dbc23b045902ac2d493b318d8e2c791b289 Mon Sep 17 00:00:00 2001
From: Benj <Benjamin.Schwerdtner@gmail.com>
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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-21  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-20 15:58 bug#54071: fix incompatible arity change help-fns Ben Schw
2022-02-20 16:26 ` Eli Zaretskii
2022-02-20 18:29   ` Lars Ingebrigtsen
2022-02-20 22:26   ` bug#54071: [External] : " Drew Adams
2022-02-21  9:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).