emacs-devel
[Top][All Lists]
Advanced

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

RE: 23.0.60; kbd returns wrong value


From: Drew Adams
Subject: RE: 23.0.60; kbd returns wrong value
Date: Fri, 16 May 2008 00:14:30 -0700

This problem is more widespread than I thought. Menu items can of course contain
spaces: <My Foobar>, and when used in submenus the same problem arises as for
<Brazilian Portuguese> in a <Describe> submenu.

An there are other keys that have spaces and so could make `edmacro-parse-keys'
choke in the same way (e.g. if in a submenu). In my `global-map', for instance,
I see these keys that contain spaces:

<RHP of Latin-1>
<RHP of Latin-2>
<RHP of Latin-3>
<RHP of Latin-4>
<RHP of TIS620>
<RHP of ISO8859/7>
<RHP of ISO8859/6>
<RHP of ISO8859/8>
<JISX0201 Katakana>
<JISX0201 Roman>
<RHP of ISO8859/5>
<RHP of Latin-5>
<RHP of Latin-9>
<RHP of Latin-8>
<Big5 (Level-1)>
<Big5 (Level-2)>
<VISCII lower>
<VISCII upper>
<Arabic digit>
<Arabic 1-col>
<rev ASCII>
<Arabic 2-col>
<IS 13194>
<Indian glyph>
<Tibetan 1-col>
<Unicode subset 2>
<Unicode subset 3>
<Unicode subset>
<Indian 2-col>
<Tibetan 2-col>

The bug is thus with `edmacro-parse-keys', not with the fact of having keys with
spaces.

> From: Drew Adams Sent: Tuesday, May 13, 2008 1:02 PM
> This is a menu item in menu-bar-help-menu:
> <describe> <describe-language-environment> <European> 
> <Brazilian Portuguese>
>  
> Evaluating this:
> (kbd "<describe> <describe-language-environment> <European> <Brazilian
> Portuguese>")
>  
> produces the following incorrect result:
>  
> [describe describe-language-environment European
>  60 66 114 97 122 105 108 105 97 110 80 111 114
>  116 117 103 117 101 115 101 62]
>  
> After tracing edmacro-parse-keys, the problem seems to be here:
>  
> (while (and (< pos (length string))
>   (string-match "[^ \t\n\f]+" string pos))
>       (let ((word (substring string (match-beginning 0) 
> (match-end 0)))
>  
> The sexp (substring "<describe> 
> <describe-language-environment> <European>
> <Brazilian Portuguese>" 54 64) returns "<Brazilian", which is 
> only half of the
> entry.
>  
> IOW, the code is not expecting a space char. Which is the problem: the
> edmacro-parse-keys code or the definition of the key itself,
> <Brazilian Portuguese>, which includes a space char?
> 
> This problem is not new with Emacs 23, BTW.
>  
> 
> In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
>  of 2008-05-04 on LENNART-69DE564
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --no-opt 
> --cflags -Ic:/g/include
> -fno-crossjumping'
>  
> 
> 
> 
> 





reply via email to

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