emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

signature change to `help-window-setup' - another obstacle/hoop


From: Drew Adams
Subject: signature change to `help-window-setup' - another obstacle/hoop
Date: Thu, 24 Nov 2011 15:25:14 -0800

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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]