[Top][All Lists]
[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 16:46:50 -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.
- 23.0.60; kbd returns wrong value, Drew Adams, 2008/05/13
- RE: 23.0.60; kbd returns wrong value, Drew Adams, 2008/05/16
- Re: 23.0.60; kbd returns wrong value, Stefan Monnier, 2008/05/17
- RE: 23.0.60; kbd returns wrong value, Drew Adams, 2008/05/18
- More key strangeness (was: 23.0.60; kbd returns wrong value), David Kastrup, 2008/05/18
- Re: More key strangeness, Stefan Monnier, 2008/05/19