From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: signature change to `help-window-setup' - another obstacle/hoop Date: Thu, 24 Nov 2011 15:25:14 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322177127 15064 80.91.229.12 (24 Nov 2011 23:25:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2011 23:25:27 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 25 00:25:24 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTifT-000850-GS for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2011 00:25:23 +0100 Original-Received: from localhost ([::1]:33588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTifS-00056q-U7 for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2011 18:25:22 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTifQ-00056j-J6 for emacs-devel@gnu.org; Thu, 24 Nov 2011 18:25:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTifP-0008Qo-I6 for emacs-devel@gnu.org; Thu, 24 Nov 2011 18:25:20 -0500 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:52652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTifP-0008Qj-A1 for emacs-devel@gnu.org; Thu, 24 Nov 2011 18:25:19 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pAONPH1I020750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 Nov 2011 23:25:18 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pAONPGMo021301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Nov 2011 23:25:17 GMT Original-Received: from abhmt117.oracle.com (abhmt117.oracle.com [141.146.116.69]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pAONPBU8023170 for ; Thu, 24 Nov 2011 17:25:11 -0600 Original-Received: from dradamslap1 (/10.159.44.13) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Nov 2011 15:25:11 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcyrAFGwypmAWuUmSOCbhbguto6ESA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090201.4ECED25E.00D5,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146208 Archived-At: FWIW... For Emacs 24, the signature of `help-window-setup' was changed so that it is completely different (incompatible). Instead of a list of frames plus a list of window tuples, it now takes a single window as arg. Not a big deal, you'll say, since code that uses it can always test the current version and DTRT accordingly. However, macro `with-help-window' (used all over the place now) calls `help-window-setup'. And as we all know, macros are used at compile time, typically not at runtime. A runtime version test is useless here. You cannot grab one version of the macro for compiling and hope that it will work for both 23 and 24, simply because of this signature change. For code that uses `with-help-window', the simple calling-sequence change for `help-window-setup' makes it impossible to byte-compile in Emacs 23 and use that compiled code in Emacs 24 (as well as 23). The macro generates either Emacs 23 code or Emacs 24 code - take your pick, but do so at compile time. So much for lispy late binding... (Yes, workarounds are possible: write a new version of the macro that generates a runtime Emacs version test and DTRT, etc. The point is that whatever one tries to do to work around this ugliness is itself ugly and a pain.) `with-help-window' and `help-window-setup' were both introduced in Emacs 23 - not 20 years ago. In the very next release they have already been thrown overboard and replaced by "new, improved" (and incompatible) versions. Presumably you think of these as only throw-away helpers. "Helper" is not the word that comes to my mind, however... I hope the gain for Emacs Dev is worth the trouble for users and 3rd-party libraries. This seems to be yet more fallout from the far-reaching buffer-display shenanigans, er, uh ... enhancements. Have you reached fixed-point yet, or will you be redesigning buffer display again in Emacs 24.2 and 25?