GNU bug report logs - #13599
24.2; (max-char) is too low (and hard to change)

Previous Next

Package: emacs;

Reported by: Magnar Sveen <magnars <at> gmail.com>

Date: Thu, 31 Jan 2013 18:44:02 UTC

Severity: minor

Merged with 1042, 32562

Found in version 24.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 13599 <at> debbugs.gnu.org (full text, mbox):

From: Magnar Sveen <magnars <at> gmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 13599 <at> debbugs.gnu.org
Subject: Re: bug#13599: 24.2; (max-char) is too low (and hard to change)
Date: Thu, 31 Jan 2013 20:44:58 +0100
Thanks for the quick response!

Eli Zaretskii writes:

>> Doing a M-: (read-char) s-8 gives me the key value of 8388664.
>
> Which is 800038 in hex.  Rings any bells?  (Hint: 38 hex is the digit
> 8.)

That makes sense, thanks.

> Your s-8 is a character with a modifier.  max-char returns the max
> value of a character, excluding any modifiers.  So that value has
> nothing to do with your difficulties in binding s-8 to insert [.
> Something entirely different is at work here, probably some problem in
> the code that you used to do the key binding.  But since you didn't
> show that code, it's hard to help you.

I did show the code:

    (keyboard-translate 8388664 ?\[)

I also tried

    (keyboard-translate ?\s-8 ?\[)

which of course is the same thing. They both fail at (characterp).

In my flailing, I also tried

    (keyboard-translate (kbd "s-8") ?\[)

No success with that one. Checking that I was not totally off, I tried

    (keyboard-translate ?\C-h ?\[)

which did work, while

    (keyboard-translate ?\C-8 ?\[)

did not. Not a character again. So it's not only super.

>> So, is this a bug?

> No.

Fair enough.

Any tips on how to actually translate keys where read-char returns a
value including the modifier then?

- Magnar




This bug report was last modified 6 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.