From xemacs-m  Wed Jun 11 10:14:43 1997
Received: from mgate.uni-hannover.de (mgate.uni-hannover.de [130.75.2.3])
	by xemacs.org (8.8.5/8.8.5) with SMTP id KAA17484
	for <xemacs-beta@xemacs.org>; Wed, 11 Jun 1997 10:14:42 -0500 (CDT)
Received: from helios (actually helios.tnt.uni-hannover.de) by mgate 
          with SMTP (PP); Wed, 11 Jun 1997 17:13:27 +0200
Received: from daedalus.tnt.uni-hannover.de by helios (SMI-8.6/SMI-SVR4) 
          id RAA10086; Wed, 11 Jun 1997 17:13:01 +0200
Received: by daedalus.tnt.uni-hannover.de (SMI-8.6/SMI-SVR4) id RAA15413;
          Wed, 11 Jun 1997 17:12:58 +0200
Date: Wed, 11 Jun 1997 17:12:58 +0200
Message-Id: <199706111512.RAA15413@daedalus.tnt.uni-hannover.de>
From: Heiko Muenkel <muenkel@tnt.uni-hannover.de>
To: xemacs-beta@xemacs.org
Subject: Bug in x-compose.el - Fixed!
In-Reply-To: <199706061105.NAA03515@daedalus.tnt.uni-hannover.de>
References: <199706041436.QAA03948@daedalus.tnt.uni-hannover.de> <m2hgfdhmoe.fsf@altair.xemacs.org> <199706061105.NAA03515@daedalus.tnt.uni-hannover.de>
X-Mailer: VM 6.22 under 19.15p5 XEmacs Lucid
X-Face: n}R'l6CHRf>pi&bj7[x0CW3:kmXm@1)7m+l*9[fp;-Ow4Xe~=5E;skf?2> 
        y]f{HzB|Q(\V9+y$PP~.4G[2n4W7{6Ilm[AMY9B:0kj.K_$-d%p4YIF*bX;=ADp6{ 
        HS@NEv9c.VII+9PgXHASx}K(jy^t=q%qzZ72q1e4E;O!$A$`&wgtLk"1%p.nC_G!] 
        4d1!+J4Q#YD_iXeEy`1x)d\r$1Qn\'23n|[8Y_xzuXJJ7W(EGqnzB]`]aq??;+z=) 
        DW~\'Vq&F'g%QU[Mv2:}nS>SdZFTEC2GsgB=Q,:~H<R5S[:ZN%B:s0;|v1x"Jb
MIME-version: 1.0
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: 8bit

>>>>> "Heiko" == Heiko Muenkel <muenkel@tnt.uni-hannover.de> writes:

>>>>> "Steven" == Steven L Baur <steve@xemacs.org> writes:
    Steven> Heiko Muenkel <muenkel@tnt.uni-hannover.de> writes:
    >>> This bug occurs at least in 20.3 Beta 2 and in 19.15.  After
    >>> (require 'x-compose) the key sequence degree space should
    >>> insert a degree sign, but nothing happens. It seems that the
    >>> kbd macro degree is broken. Where are these kbd macros
    >>> defined?

    Steven> degree isn't a keyboard macro, it is a keysym:

    Steven> (x-valid-keysym-name-p "degree") => t

    Steven> I'm not sure how to duplicate what you're typing.

    Heiko> On the Sun Keyboard (and I think on a PC keyboard as well)
    Heiko> there's a key left from the 1 which inserts the character ^
    Heiko> without and  with holding the Shift key. The  is the
    Heiko> degree key. Without x-compose, the key inserts just the 
    Heiko> character. If x-compose is loaded, then the degree key is a
    Heiko> prefix key, it is now used as a so called dead key. You can
    Heiko> now insert a  by first typing the degree key and than the
    Heiko> a. The key sequence "degree space" should now insert a 
    Heiko> character, but instead nothing happens. C-h b prints the
    Heiko> following: degree space Kbd Macro: degree There are also
    Heiko> other bindings for `Kbd Macro: degree', but non of them
    Heiko> worked. Therefore I came to the conclusion, that the kbd
    Heiko> macro degree is broken - but I can't find the place, where
    Heiko> all these kbd macros are defined.



    Steven> (x-keysym-on-keyboard-p "degree") => nil --
    Steven> steve@calag.com baur Unsolicited commercial e-mail will be
    Steven> billed at $250/message.

    Heiko> PS: I hope you can read the  and  characters in this
    Heiko> email.

The following is a patch to fix this bug in XEmacs 20.3-b5 (The same
bug is also in XEmacs 19.15 - I'll send another fix for 19.15, if
there's any interest):

*** lisp/x11/x-compose.el.~1~	Fri Jun  6 02:57:59 1997
--- lisp/x11/x-compose.el	Wed Jun 11 16:58:36 1997
***************
*** 4,9 ****
--- 4,11 ----
  
  ;; Author: Jamie Zawinski <jwz@netscape.com>
  ;; Maintainer: XEmacs Development Team
+ ;; Changed: 11 Jun 1997 by Heiko Muenkel <muenkel@tnt.uni-hannover.de>
+ ;;	The degree sign couldn't be inserted with the old version.
  ;; Keywords: i18n
  
  ;; This file is part of XEmacs.
***************
*** 114,119 ****
--- 116,128 ----
  ;;;this doesn't work yet###autoload
  (define-key global-map [multi-key]	'compose-key)
  
+ ;; The following is necessary, because one can't rebind [degree]
+ ;; and use it to insert the degree sign!
+ (defun compose-insert-degree ()
+   "Inserts a degree sign."
+   (interactive)
+   (insert ?\260))
+ 
  ;; The "Dead" keys:
  ;;
  (define-key global-map [acute]		compose-acute-map)
***************
*** 339,345 ****
  (define-key compose-circumflex-map "!"	[brokenbar])
  (define-key compose-circumflex-map "-"	[macron])
  (define-key compose-circumflex-map "_"	[macron])
! (define-key compose-circumflex-map "0"	[degree])
  (define-key compose-circumflex-map "1"	[onesuperior])
  (define-key compose-circumflex-map "2"	[twosuperior])
  (define-key compose-circumflex-map "3"	[threesuperior])
--- 348,354 ----
  (define-key compose-circumflex-map "!"	[brokenbar])
  (define-key compose-circumflex-map "-"	[macron])
  (define-key compose-circumflex-map "_"	[macron])
! (define-key compose-circumflex-map "0"	'compose-insert-degree)
  (define-key compose-circumflex-map "1"	[onesuperior])
  (define-key compose-circumflex-map "2"	[twosuperior])
  (define-key compose-circumflex-map "3"	[threesuperior])
***************
*** 367,373 ****
  
  (set-keymap-name compose-ring-map 'compose-ring-map)
  (set-keymap-default-binding compose-ring-map 'self-insert-command)
! (define-key compose-ring-map " "	[degree])
  (define-key compose-ring-map "A"	[Aring])
  (define-key compose-ring-map "a"	[aring])
  
--- 376,382 ----
  
  (set-keymap-name compose-ring-map 'compose-ring-map)
  (set-keymap-default-binding compose-ring-map 'self-insert-command)
! (define-key compose-ring-map " "	'compose-insert-degree)
  (define-key compose-ring-map "A"	[Aring])
  (define-key compose-ring-map "a"	[aring])
  
***************
*** 383,389 ****
  (define-key compose-map " ~"	"~")
  (define-key compose-map "  "	[nobreakspace])
  (define-key compose-map " \""	[diaeresis])
! (define-key compose-map " *"	[degree])
  
  (define-key compose-map "!!"	[exclamdown])
  (define-key compose-map "!^"	[brokenbar])
--- 392,398 ----
  (define-key compose-map " ~"	"~")
  (define-key compose-map "  "	[nobreakspace])
  (define-key compose-map " \""	[diaeresis])
! (define-key compose-map " *"	'compose-insert-degree)
  
  (define-key compose-map "!!"	[exclamdown])
  (define-key compose-map "!^"	[brokenbar])
***************
*** 437,443 ****
  (define-key compose-map "0c"	[copyright])
  (define-key compose-map "0R"	[registered])
  (define-key compose-map "0r"	[registered])
! (define-key compose-map "0^"	[degree])
  
  (define-key compose-map "1^"	[onesuperior])
  (define-key compose-map "14"	[onequarter])
--- 446,452 ----
  (define-key compose-map "0c"	[copyright])
  (define-key compose-map "0R"	[registered])
  (define-key compose-map "0r"	[registered])
! (define-key compose-map "0^"	'compose-insert-degree)
  
  (define-key compose-map "1^"	[onesuperior])
  (define-key compose-map "14"	[onequarter])

