From: "D. Goel" <deego@glue.umd.edu>
Cc: emacs-devel@gnu.org
Subject: Re: define-key acting strange..
Date: 24 May 2002 02:43:25 -0400 [thread overview]
Message-ID: <ap3g00it59u.fsf@poynting.umd.edu> (raw)
In-Reply-To: <ap38z6aun64.fsf@poynting.umd.edu>
( A quick update before i go away for the long
weekend.. to... Maryland!!!.. )..
All of the problem was being caused by the one line in that
expression: (guess i will have to wait another day to learn GDB :)
(define-key [t] <foo>).. and that <foo> could be anything ..
Emacs is not frozen.. 'tis just that this line has the effect of
adding a (t . <foo>) to your keymap <-- Whether this result is a bug
or not, i am not sure..
Now depending on <foo> and the other bindings in the
key-translation-map, one might end up effectively getting a 'frozen'
emacs..
Consider this expression: (this is how i first traced that
(not-really-a-)bug..)
(progn
(message "DOING")
(define-key key-translation-map [t] "f")
(define-key key-translation-map "u" "v")
(message "DONE")
(goto-char (point-max))
(insert (format "%s" key-translation-map))
(write-file "~/gg.gg")
)
After eval'ing this, key-translation-map looks like this:
(keymap (117 . v) (t . f) (24 keymap (56 . iso-transl-ctl-x-8-map)))
(117 is u...).. Once you have this keymap, *everything* you type
inserts a f, except when you type u, which inserts v. So, everything
is happening in accordance with key-translation-map, IMHO.
In the original expression, everything was getting mapped to
[T]... which just beeped at us .. what is [T] ?
BTW, up-arrow inserts 3 f's... guess why ? :) up-->ESC O A --> f f f
Wishing a great weekend to all..
D <http://www.glue.umd.edu/~deego/>
--
Why don't *we* have congressmen like the one writing this!!! ---->
http://www.gnu.org.pe/resmseng.html
next prev parent reply other threads:[~2002-05-24 6:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ap3n0uwm22b.fsf@poynting.umd.edu>
[not found] ` <ap37klz9ajp.fsf@poynting.umd.edu>
[not found] ` <200205202134.g4KLY4g26004@aztec.santafe.edu>
[not found] ` <ap38z6dejnw.fsf@poynting.umd.edu>
[not found] ` <ap38z6carb6.fsf@poynting.umd.edu>
2002-05-24 0:44 ` define-key acting strange Richard Stallman
2002-05-24 5:31 ` D. Goel
2002-05-24 6:43 ` D. Goel [this message]
2002-05-24 11:02 ` Andreas Schwab
2002-05-25 21:19 ` Richard Stallman
2002-05-24 8:13 ` Thien-Thi Nguyen
2002-05-24 12:34 ` Eli Zaretskii
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=ap3g00it59u.fsf@poynting.umd.edu \
--to=deego@glue.umd.edu \
--cc=emacs-devel@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).