unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Is there a way to unset all Emacs key bindings?
Date: Thu, 16 Jan 2014 23:47:19 -0700	[thread overview]
Message-ID: <lbajkd$5ui$1@ger.gmane.org> (raw)
In-Reply-To: <87d2jrkd3o.fsf@nl106-137-194.student.uu.se>

On 1/16/14 11:14 AM, Emanuel Berg wrote:
> (use-global-map '(keymap nil))

Or: (use-global-map (make-keymap))

And on a suitable hook: (use-local-map (make-sparse-keymap))

But according to the "Active Keymaps" node of the Emacs manual, there may be
other keymaps to disable to make emacs completely unusable:

+-------------------------------------------------------------------------------
|    Normally the active keymaps are the `keymap' property keymap, the
| keymaps of any enabled minor modes, the current buffer's local keymap,
| and the global keymap, in that order.  Emacs searches for each input
| key sequence in all these keymaps.  *Note Searching Keymaps::, for more
| details of this procedure.
+-------------------------------------------------------------------------------

And here is what the "Searching Keymaps" node says:

+-------------------------------------------------------------------------------
| After translation of event subsequences (*note Translation Keymaps::)
| Emacs looks for them in the active keymaps.  Here is a pseudo-Lisp
| description of the order and conditions for searching them:
|
|      (or (if overriding-terminal-local-map
|              (FIND-IN overriding-terminal-local-map)
|            (if overriding-local-map
|                (FIND-IN overriding-local-map)
|              (or (FIND-IN (get-char-property (point) 'keymap))
|                  (FIND-IN-ANY emulation-mode-map-alists)
|                  (FIND-IN-ANY minor-mode-overriding-map-alist)
|                  (FIND-IN-ANY minor-mode-map-alist)
|                  (if (get-text-property (point) 'local-map)
|                      (FIND-IN (get-char-property (point) 'local-map))
|                    (FIND-IN (current-local-map))))))
|          (FIND-IN (current-global-map)))
+-------------------------------------------------------------------------------
-- 
Kevin Rodgers
Denver, Colorado, USA




  reply	other threads:[~2014-01-17  6:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.12070.1389861047.10748.help-gnu-emacs@gnu.org>
2014-01-16 17:17 ` Is there a way to unset all Emacs key bindings? Emanuel Berg
2014-01-16 17:42   ` Drew Adams
2014-01-16 18:14 ` Emanuel Berg
2014-01-17  6:47   ` Kevin Rodgers [this message]
2014-01-16  7:43 Parke
2014-01-16  9:27 ` Marcin Borkowski

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='lbajkd$5ui$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@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.
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).