unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ben Schw <benjamin.schwerdtner@gmail.com>
To: 54071@debbugs.gnu.org
Subject: bug#54071: fix incompatible arity change help-fns
Date: Sun, 20 Feb 2022 16:58:28 +0100	[thread overview]
Message-ID: <CAOiYe4ZUfyjqJjNgXmR++ga6=qtOHodNGUwcA1Xp0SsWrKGfpw@mail.gmail.com> (raw)


[-- 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


             reply	other threads:[~2022-02-20 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-20 15:58 Ben Schw [this message]
2022-02-20 16:26 ` bug#54071: fix incompatible arity change help-fns 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOiYe4ZUfyjqJjNgXmR++ga6=qtOHodNGUwcA1Xp0SsWrKGfpw@mail.gmail.com' \
    --to=benjamin.schwerdtner@gmail.com \
    --cc=54071@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).