APPROVE COMMIT 21.5 RECOMMEND 21.4
Ville, thanks for snuffling this out.
Malcolm, there may be a similar problem in event-gtk.h; I don't
understand GTK well enough to guess. I don't recall such reports for
GTK builds, but they're not as common as Xt builds so that may not
mean much. Ville, would you be able to check whether this occurs with
a GTK build, with and without your patch?
2005-01-12 Ville Skyttä <scop(a)xemacs.org>
* console-x.h: #include X11/keysym.h before xintrinsic.h.
>>>> "Ville" == Ville Skyttä
<scop(a)xemacs.org> writes:
Ville> When pressing AltGr in XEmacs 21.4.1[56] on my Fedora Core
Ville> 3 box (Mule, Finnish X keymap, x.org X11 6.8.1), an error
Ville> is signaled:
Ville> iso-level3-shift is not defined
Ville> Additionally, pressing AltGr quits I-search, which is very
Ville> annoying. GNU Emacs suffers from the same I-search
Ville> problem, but does not display any errors.
Ville> I Googled and found some workaround suggestions like:
Ville> (define-key global-map [(iso-level3-shift)] '#ignore)
Ville> This "works" in the sense that the error message goes away;
Ville> however it does not help with the I-search problem which is
Ville> the important one.
Ville> But when discussing this in Red Hat Bugzilla, these were
Ville> found:
Ville> Apparent root cause:
Ville>
https://bugs.freedesktop.org/show_bug.cgi?id=1625
Ville> The workaround applied in GNU Emacs:
Ville>
http://lists.gnu.org/archive/html/bug-gnu-emacs/2004-10/msg00150.html
Ville> Attached is a workaround patch for XEmacs 21.4.16 which
Ville> fixes the problem for me (probably applicable to 21.5 too).
Ville> Could someone review whether this patch is worth applying
Ville> in XEmacs? Or maybe <X11/keysym.h> should be included in
Ville> xintrinsic.h before <X11/Intrinsic.h> instead for
Ville> completeness?
The patch is at worst harmless unless somebody is doing something
_really_ evil with keysym definitions. It should be applied.
It only matters when both keysym.h and Xutil.h are being _used_.
There are some instances where Xutil is #include'd, plus there's the
GTK code. I think it's probably better to explicitly move the include
for keysym.h in the files where it is used rather than put it in
xintrinsic.h. Here's a slightly improved patch (I just love to read
my own writing ;-) and a ChangeLog.
2005-01-12 Ville Skyttä <scop(a)xemacs.org>
* console-x.h: #include X11/keysym.h before xintrinsic.h.
Index: src/console-x.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-x.h,v
retrieving revision 1.12
diff -u -r1.12 console-x.h
--- src/console-x.h 12 Apr 2001 18:23:30 -0000 1.12
+++ src/console-x.h 17 Jan 2005 09:21:32 -0000
@@ -35,10 +35,13 @@
#ifdef HAVE_X_WINDOWS
#include "console.h"
+/* must come before Xutil.h, which is included indirectly from xintrinsic.h,
+ to avoid breakage in keysym-parsing macros from X11R6, at least X.org as
+ of 2005-01-17, and probably XFree86 too from reports on c.e.x */
+#include <X11/keysym.h>
#include "xintrinsic.h"
#include <X11/cursorfont.h>
-#include <X11/keysym.h>
#include <X11/Xatom.h>
#include