From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66554: [PATCH] Add the public API of Compat to the core Date: Tue, 06 Feb 2024 21:37:01 +0200 Message-ID: <86r0hpz8o2.fsf@gnu.org> References: <87pm1ggrdx.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17861"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 06 20:38:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rXRGj-0004LN-4z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Feb 2024 20:38:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXRGQ-0003z8-NI; Tue, 06 Feb 2024 14:37:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXRGO-0003yl-OW for bug-gnu-emacs@gnu.org; Tue, 06 Feb 2024 14:37:48 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXRGO-0006Lz-EM for bug-gnu-emacs@gnu.org; Tue, 06 Feb 2024 14:37:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXRGb-0001X2-Nd for bug-gnu-emacs@gnu.org; Tue, 06 Feb 2024 14:38:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Feb 2024 19:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66554-submit@debbugs.gnu.org id=B66554.17072482475842 (code B ref 66554); Tue, 06 Feb 2024 19:38:01 +0000 Original-Received: (at 66554) by debbugs.gnu.org; 6 Feb 2024 19:37:27 +0000 Original-Received: from localhost ([127.0.0.1]:55149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRG2-0001W9-Rb for submit@debbugs.gnu.org; Tue, 06 Feb 2024 14:37:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRG0-0001Vv-BD for 66554@debbugs.gnu.org; Tue, 06 Feb 2024 14:37:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXRFf-0006FA-Sm; Tue, 06 Feb 2024 14:37:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Eh++qrdTU7enDjD1B6hGxxeDkgc6eUY7doQdPHf17FA=; b=KfIf6SPxFj5E 0Vr3yxr65tYLpruOJAXopDHIAlu6heox6fmhhwKATMnmQPki3E3pNJ7Al9mJGwKbJV056dh9XZUbH YOW3fZWt2JgB4799DZGOgjKHeEz0TvTpWwycKo9T4ZCKzuYNR5oyWJeuPHCSpfAlbZtidkYG8kRbg V8y+3cL1uZ6TWvAGUPZ6qsjBYOK9K5uSXVdpzdhXcf75ikpLOXxtm7LXwminyzH7IND4p9T4HJ2+B rc0+fWholL/5gkdQFg39meeaywyr11/arjNim3y9xJlY/SDOUgNdGtVm5F4jD8G1ru5ZFyL2n4jhj YgtAMos3OPLCOBLxb6+ckw==; In-Reply-To: <87h6ils91z.fsf@posteo.net> (message from Philip Kaludercic on Tue, 06 Feb 2024 19:10:32 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279512 Archived-At: > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > monnier@iro.umontreal.ca > Date: Tue, 06 Feb 2024 19:10:32 +0000 > > >> +@defmac compat-call fun &rest args > >> +This macro calls the compatibility function @var{fun} with @var{args}. > >> +Many functions provided by Compat can be called directly without this > >> +macro. However in the case where Compat provides an alternative > >> +version of an existing function, the function call has to go through > >> +@code{compat-call}. > >> +@end defmac > > > > This description left me without understanding when I need to use > > compat-call and when I can just call FUN. Can you explain more? > > The intention was for this paragraph to catch that case, > > However in the case where Compat provides an alternative version of an > existing function, the function call has to go through > @code{compat-call}. > > though the real information is to be found in the Compat manual, where > the functions that have to be called via compat-call are documented. > > Should the above sentence be rephrased to give a general feeling for > when this is the case > > However in the case where Compat provides an alternative version of an > existing function, the function call has to go through > @code{compat-call}. This is the case when, for example the signature > changes between versions, preventing older versions of Emacs from > using optional arguments introduced in newer releases. > > or should we just refer to the external manual? Let me try to make my point more clear: I'd prefer that the reader emerges from reading this description with a practical way of knowing when to call the function directly and when to call it via 'compat-call'. If that's not easy to understand, perhaps we should tell that 'compat-call' should always be used, to avoid some rare corner cases where a direct call will not do, and be done?