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: Sat, 17 May 2008 17:00:25 -0700

> > > >> 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)))
> > > 
> > > (string-match "[^ \t\n\f<]+\\|<[^>]+>" ... instead?
> > 
> > Yes, please install that fix; it seems to do the job. Thanks.
> 
> Actually, no, that breaks it for "C-x <", producing only "^X" 
> (control-x character).
> 
> The following regexp fixes that particular breakage:
> "[^ \t\n\f<]+\\|<[^>]+>\\|<+"
> 
> But that breaks other things. With input of "C-x <<>>", the 
> output is [24 < 62]. With input of "C-x << >>", the output is
> [24 <\ 62]. In the vanilla code, e.g., the first produces
> [24 <>], and the second produces "^X<<>>" (control-x char),
> which are presumably correct.
> 
> I have no idea what that is all about - there are no comments 
> in the code wrt what it is supposed to do with which inputs.
> 
> It would be good if someone who really understands 
> `edmacro-parse-keys' would please take a look and fix it as
> needed. And please add a doc string too.

FYI - some more info about use of "[^ \t\n\f<]+\\|<[^>]+>\\|<+" as the regexp:

Input of "M-<" produces "M-<", but it produces [134217788] with vanilla code
(which is correct).





reply via email to

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