From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: tramp-compat-funcall -> compat-funcall? Date: Sat, 24 Sep 2016 08:54:31 +0200 Message-ID: <87oa3dkct4.fsf@gmx.de> References: <87lgykci0z.fsf@lifelogs.com> <87h997u1rq.fsf@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1474700105 5808 195.159.176.226 (24 Sep 2016 06:55:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Sep 2016 06:55:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 24 08:54:57 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bngrJ-00088M-VD for ged-emacs-devel@m.gmane.org; Sat, 24 Sep 2016 08:54:50 +0200 Original-Received: from localhost ([::1]:57177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bngrH-0002X3-C6 for ged-emacs-devel@m.gmane.org; Sat, 24 Sep 2016 02:54:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bngrB-0002Wx-5H for emacs-devel@gnu.org; Sat, 24 Sep 2016 02:54:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bngr8-00041O-2X for emacs-devel@gnu.org; Sat, 24 Sep 2016 02:54:41 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:64598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bngr7-00040m-OV for emacs-devel@gnu.org; Sat, 24 Sep 2016 02:54:37 -0400 Original-Received: from detlef.gmx.de ([93.209.92.247]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LuxG5-1aoXZx1hY1-0108f0; Sat, 24 Sep 2016 08:54:32 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 23 Sep 2016 11:49:50 -0400") X-Provags-ID: V03:K0:Yvq+A94BPj+U3TC4N7hDe15bSchSY0w66+9ioKGrzviJ7nTxB9l hu9If5FE7IRSNEAZYfjGQKW3DmIMb3sgq5zHE0l8Uq+siA2vVEqCaJdCgPEE/LRjHdZt7hB 0am+x+jdVJUBxWzoc0E7MT7VaVtJxbESWNcaWZMdM3IoIiztcOFuEduR202h6t4uFUC9AGP cqp0s/SHimiKO4VZIuF/w== X-UI-Out-Filterresults: notjunk:1;V01:K0:Eetzz0AqsSI=:rJF0UNo806WTVSFfydTk7Q YQz18jFRHVucde9C3M8OmcFpOAwUVIR+Q4JAfqLbyyyoshQEAeR++RAzm5k7N97LD4+w5M08g UmrNKLc7HYcy8lQuhpBQ8xtzoife3x5Sv1R1hCwUGvrfySFbhF1G+lo/Fk9+Z1ZUZLuK0IwMa pHxhQuLPNKE9DI1oJKu4deg1do7Qj/WymkKW9y9QHtqGIV1SoftK2a8jaP5e1BsNOgJo45Bho ddx1Cb1yc0eTCiW7dwv+vJfD2mJTBKtWpnewWkch1PbKmsws7gBCdNSShq8yqJFSzC4NIFp3n y6Y2iQnvFdQTGjIXjE0sVpRWpvvjkW4NVjVYcMcRCv5kfLkalIhpr+o7AOmtExc332Y55x1qo kBcZdwRjgn11G4DfFNwA4pz2bqQAJDnSkQZEqogpHwQAFvXoVxAdLXx6HRJlk2SmYj9WerkF9 +yojo3agYALKnYLG6MBLkIh09n1NLZ0z4i0kns+EWeeYArdvL/cMdtb8DZ6tS2FdXc5wQMVFh TNnsLvgxq0ipP+EdH6Izi36BMsW3ygQJRjTJNKBAeuNkyLnnZy250TcEt4akIBv0GCAa4h3h9 XxyDaxfzc1YtfBlQ7XQV9d4lpHlpDBFqohKTq92jBP1/7sCjDUBniur7EiNSXoggCq9qC1MA9 r3PTeT6s7yZvfta2ywUXo++oJuJF7s/CBRL0/alwdaO+Y/CF2xNThcUapM7grA2pe89Bpdv2R lLWp3UgiuXImObjOquGTjLzMA/Uwz7DBGvV1b6ol1L/bv63AwWHJiJhtwEdRv4VEBQVnmkT7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207748 Archived-At: Stefan Monnier writes: >> The use case, I think, is "to provide compatibility with older Emacsen, >> I need a convenient way to call a function softly without compiler >> warnings if it doesn't exist." I think, based on the two examples I gave >> (`gnus-funcall-no-warning' was the other instance), that it's not an >> uncommon need, and it's better to provide it in a core facility than ask >> package maintainers to implement it. > > There's (if (fboundp ') ( )) already (which is much > better than tramp-compat-funcall since it says explicitly what to do if > the function doesn't exist). > > So the question is what to do for the use cases of > tramp-compat-funcall not covered by this if/fboundp idiom. Your code snippet misses the `with-no-warnings' umbrella. The part is not part of the `tramp-compat-funcall' spec by intention. It will be always compatibility code, which I don't want to see in the mainstream code. All such compatibility code is collected in tramp-compat.el, in the Tramp case. Furthermore, there's not only the case that does not exist, but there might be abother argument list now. Also handled in tramp-compat.el. `tramp-compat-funcall' has its history, and it was more complex when it had to support also XEmacs. It's simpler now, but I like to identify all backward compatibility code in Tramp by searching "C-s tramp-compat". That covers all objects declared in tramp-compat.el. This makes maintenance much easier, for example back in January when I removed XEmacs and Emacs 22 support. It doesn't hurt, so I prefer to keep it in Tramp. > Stefan Best regards, Michael.