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

* bug#54071: fix incompatible arity change help-fns
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-02-20 16:26 UTC (permalink / raw)
  To: Ben Schw; +Cc: 54071

> From: Ben Schw <benjamin.schwerdtner@gmail.com>
> Date: Sun, 20 Feb 2022 16:58:28 +0100
> 
> 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

How come an internal function is called outside Emacs?





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

* bug#54071: fix incompatible arity change help-fns
  2022-02-20 16:26 ` Eli Zaretskii
@ 2022-02-20 18:29   ` Lars Ingebrigtsen
  2022-02-20 22:26   ` bug#54071: [External] : " Drew Adams
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-20 18:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Ben Schw, 54071

Eli Zaretskii <eliz@gnu.org> writes:

>> 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
>
> How come an internal function is called outside Emacs?

Yes, I think this is a bug that should be reported to the helpful.el
maintainer(s).  Internal Emacs functions will change signatures (or
cease to exist) without warning, so they shouldn't be used by external
packages.

So I don't think there's anything to be done here in Emacs, and I'm
therefore closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#54071: [External] : bug#54071: fix incompatible arity change help-fns
  2022-02-20 16:26 ` Eli Zaretskii
  2022-02-20 18:29   ` Lars Ingebrigtsen
@ 2022-02-20 22:26   ` Drew Adams
  2022-02-21  9:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 5+ messages in thread
From: Drew Adams @ 2022-02-20 22:26 UTC (permalink / raw)
  To: Eli Zaretskii, Ben Schw; +Cc: 54071@debbugs.gnu.org

> How come an internal function is called outside Emacs?

Perhaps because it's useful?  Why does it need
to be considered only for "inside" Emacs?





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

* bug#54071: fix incompatible arity change help-fns
  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
  0 siblings, 0 replies; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-21  9:59 UTC (permalink / raw)
  To: Drew Adams; +Cc: Ben Schw, Eli Zaretskii, 54071@debbugs.gnu.org

Drew Adams <drew.adams@oracle.com> writes:

> Perhaps because it's useful?  Why does it need
> to be considered only for "inside" Emacs?

I'm usually not the first person to be enthusiastic about breaking
changes, but not changing internal functions because they are useful
leads to madness.

If it is indeed useful, then a public interface should be created
instead.





^ permalink raw reply	[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).