unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-pretest-bug@gnu.org>
Subject: 23.0.60; kbd returns wrong value
Date: Tue, 13 May 2008 13:01:55 -0700	[thread overview]
Message-ID: <003e01c8b534$31cbdd30$0200a8c0@us.oracle.com> (raw)

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	other threads:[~2008-05-13 20:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13 20:01 Drew Adams [this message]
2008-05-16  7:14 ` 23.0.60; kbd returns wrong value Drew Adams
2008-05-16  9:32   ` David Kastrup
2008-05-17 15:13     ` Drew Adams
2008-05-17 23:46       ` Drew Adams
2008-05-18  0:00         ` Drew Adams
2008-05-18  3:12     ` Stefan Monnier
2008-05-18  5:32       ` Drew Adams
2008-05-18  9:26         ` More key strangeness (was: 23.0.60; kbd returns wrong value) David Kastrup
2008-05-19  8:20           ` More key strangeness Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003e01c8b534$31cbdd30$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).