From: Chong Yidong <cyd@stupidchicken.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 835@emacsbugs.donarmstrong.com
Subject: bug#835: 23.0.60; Quick calc is quietly disabled in view-mode
Date: Mon, 01 Sep 2008 17:50:58 -0400 [thread overview]
Message-ID: <87y72bilh9.fsf@cyd.mit.edu> (raw)
In-Reply-To: <48BC59BB.5@gmx.at> (martin rudalics's message of "Mon\, 01 Sep 2008 23\:08\:11 +0200")
martin rudalics <rudalics@gmx.at> writes:
>> ! (define-key map (char-to-string (- (car x) ?a -1)) (cdr x)))
> [...]
>> ! (define-key map (upcase (char-to-string (car x))) (cdr x)))
>
>> What the original code does is the following: for a character such as
>> "n", it adds "C-n" to the keymap as well (it's a hack that relies on
>> the specific properties of the ASCII table, and needs at least a
>> comment). That's not what the patched code does: it adds "N" to the
>> keymap. Martin, what's the reason for this change?
>
> That was my intention: AFAICT `view-mode' took `Q' (and, for example,
> `E') away from calc and I simply tried to give it back to calc. But
> maybe this part of the code really intended to add a "C-" ...
Yeah, it's somewhat opaque code. The way the ASCII table is set up is
that character 1 is the character ^A, character 2 is the character ^B,
and so forth, until character 65 is the unmodified character A. Hence
(char-to-string (- ?n ?a -1)) gives 14 == ^N. (Also, ASCII control
characters are case insensitive: there's no separate ^n character.)
I suppose this means we have to find a separate fix for the original
bug...
next prev parent reply other threads:[~2008-09-01 21:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 18:53 bug#835: 23.0.60; Quick calc is quietly disabled in view-mode Chong Yidong
2008-09-01 21:08 ` martin rudalics
2008-09-01 21:50 ` Chong Yidong [this message]
2008-09-01 22:00 ` martin rudalics
2008-09-02 2:33 ` Jay Belanger
2008-09-02 9:02 ` martin rudalics
-- strict thread matches above, loose matches on Subject: below --
2008-08-31 9:08 Markus Triska
2008-08-31 10:48 ` martin rudalics
2008-09-01 17:47 ` martin rudalics
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=87y72bilh9.fsf@cyd.mit.edu \
--to=cyd@stupidchicken.com \
--cc=835@emacsbugs.donarmstrong.com \
--cc=rudalics@gmx.at \
/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).