From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, storm@cua.dk
Subject: Re: Function for deleting a key binding in a sparse keymap
Date: Sun, 11 Dec 2005 00:45:16 +0100 [thread overview]
Message-ID: <439B688C.1090207@student.lu.se> (raw)
In-Reply-To: <E1Ekw6v-0003AD-Tz@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]
Richard M. Stallman wrote:
> Go through the list below step by step. As soon as a hit is found in
> any keymap (see KeyLookup) you normally are ready.
>
>Saying "you" is a peculiar way to word it--it is Enacs that does these
>things. Could you rewrite this in terms of what Emacs does?
>
>Also, could you (or someone) turn it into Texinfo?
>
>
I have attached a new version. This is in Texinfo format and written to
be placed at the bottom of
@node Active Keymaps
in keymaps.texi.
*** Some questions:
- Could someone please tell what is happening when key lookup finds a
keymap entry? If no hit is found in the new keymap which keymap is then
the next?
- Maybe the node should have an entry in the index?
- I do not understand why @emph{TERM} gives a result looking like _TERM_
after running "make info". It is instead converted to underlined blue
text when I test with texinfo-format-region. (This is on w32. A
difference might be that texinfo-format-region is using Cygwins makeinfo
and "make info" is using makeinfo from GnuWin32. Both are version 4.8.)
- How is fill supposed to work? It seems like the texinfo makeup is not
excluded so to say when doing a fill-paragraph. Or am I mistaken?
[-- Attachment #2: finding-keymap.texi --]
[-- Type: text/plain, Size: 3067 bytes --]
@subsection Finding the keymap to use
The list below describes step by step how Emacs finds a keymap from a
given key sequence. As soon as a hit is found in any keymap (see
@ref{Key Lookup}) then if the keymap entry is a function the search is
over. However if the keymap entry is a variable symbol or a string
then Emacs restarts with the variable symbol value or the string from
FIRST-MAP.
The keymap entry could also be a keymap. In that case the next event
is looked up in that keymap. (But what happens if there is no hit
there, I can not find any documentation on this???)
@noindent
@emph{Note 1:} When Emacs finally find a function symbol through this
process it also checks for command remapping. This just replaces the
function symbol with another. It is not recursive.
@noindent
@emph{Note 2:} You may find the function @code{current-active-maps}
useful when looking into this.
@table @asis
@item START-HERE:
First apply @code{extra-keyboard-modifiers} mask to each keyboard
character read.
@end table
@itemize @bullet
@item
Each character read from the keyboard may be translated according to
@code{keyboard-translate-table}.
@item
Characters that are self-inserting are translated according to
@code{translation-table-for-input}. If a character is self-inserting
then stop here.
@item
Translate meta characters according to @code{meta-prefix-char} to a
two character sequence.
@end itemize
@table @asis
@item FIRST-MAP:
Look in @code{special-event-map}.
@end table
@itemize @bullet
@item
If using @code{read-from-minibuffer} (directly or indirectly) then
look in the keymap given as parameter then look in this. Otherwise
look in @code{minibuffer-local-map}.
@item
If using @code{read-no-blanks-input} to read from minibuffer then look
in @code{minibuffer-local-ns-map} first and then
@code{minibuffer-local-map}.
@item
If overriding-terminal-local-map look in this. Then go to GLOBAL.
@item
If overriding-local-map look in this. Then go to GLOBAL.
@item
Is there a "keymap" property of the text or overlay at point?
@item
Look for minor mode keymaps in @code{emulation-mode-map-alists}.
@item
Look for minor mode keymaps in @code{minor-mode-overriding-map-alist}
@item
Look for minor mode keymaps in @code{minor-mode-map-alist}.
@item
Is there a @code{local-map} property of the text or overlay at point?
@item
Is there a "local keymap" (those are for major modes)?
@end itemize
@table @asis
@item GLOBAL:
Look in the "current global keymap". (This is returned by
@code{current-global-map} and may be different from @code{global-map},
see @code{use-global-map}.)
@end table
@itemize @bullet
@item
If it is an ASCII function key sequences then look in
@code{function-key-map}. This map transforms to Emacs key sequences.
@item
The possibly transformed sequence after applying
@code{function-key-map} is now handled to @code{key-translation-map}
which works the same way.
@item
If any transformation was made by @code{function-key-map} or
@code{key-translation-map} then take the new sequence and go back to
FIRST-MAP.
@end itemize
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2005-12-10 23:45 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 9:32 Function for deleting a key binding in a sparse keymap LENNART BORGMAN
2005-12-08 14:24 ` Kim F. Storm
2005-12-08 15:03 ` Lennart Borgman
2005-12-08 16:53 ` Stefan Monnier
2005-12-08 18:36 ` Lennart Borgman
2005-12-08 18:56 ` Stefan Monnier
2005-12-08 23:59 ` Lennart Borgman
2005-12-09 11:24 ` Kim F. Storm
2005-12-09 15:03 ` Richard M. Stallman
2005-12-09 20:12 ` Lennart Borgman
2005-12-10 4:13 ` Richard M. Stallman
2005-12-10 23:45 ` Lennart Borgman [this message]
2005-12-11 1:12 ` Stefan Monnier
2005-12-11 2:16 ` Lennart Borgman
2005-12-11 8:14 ` Stefan Monnier
2005-12-11 16:49 ` Richard M. Stallman
2005-12-11 16:49 ` Richard M. Stallman
2005-12-12 1:41 ` Lennart Borgman
2005-12-12 15:52 ` Stefan Monnier
2005-12-12 17:02 ` Lennart Borgman
2005-12-13 15:52 ` Stefan Monnier
2005-12-12 16:18 ` Richard M. Stallman
2005-12-12 19:09 ` Lennart Borgman
2005-12-13 17:50 ` Richard M. Stallman
2005-12-14 0:50 ` Lennart Borgman
2005-12-14 20:02 ` Richard M. Stallman
2005-12-10 23:40 ` Kim F. Storm
2005-12-11 0:29 ` Lennart Borgman
2005-12-11 0:54 ` Lennart Borgman
2005-12-11 16:49 ` Richard M. Stallman
2005-12-08 23:14 ` Function for deleting a key binding in a sparse keymap - bug in menus? Lennart Borgman
-- strict thread matches above, loose matches on Subject: below --
2005-12-04 23:58 Function for deleting a key binding in a sparse keymap Lennart Borgman
2005-12-05 16:38 ` Richard M. Stallman
2005-12-05 16:55 ` Lennart Borgman
2005-12-06 16:42 ` Richard M. Stallman
2005-12-06 17:04 ` Lennart Borgman
2005-12-06 21:26 ` Stefan Monnier
2005-12-06 22:18 ` Lennart Borgman
2005-12-06 22:28 ` Stefan Monnier
2005-12-06 23:01 ` Lennart Borgman
2005-12-07 1:56 ` Stefan Monnier
2005-12-07 9:56 ` Lennart Borgman
2005-12-07 10:13 ` Lennart Borgman
2005-12-07 14:33 ` Lennart Borgman
2005-12-08 9:10 ` Kim F. Storm
2005-12-07 17:06 ` Richard M. Stallman
2005-12-07 17:12 ` Lennart Borgman
2005-12-05 19:42 ` 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=439B688C.1090207@student.lu.se \
--to=lennart.borgman.073@student.lu.se \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=storm@cua.dk \
/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).