From: Alexander Shukaev <haroogan@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: How to truly unbind global bindings?
Date: Tue, 25 Nov 2014 22:05:35 +0100 [thread overview]
Message-ID: <CAKu-7Wy=g4gr_-HGe9Axz=4BUKGcCYF8L+Ah93oVVyzMVi5tQw@mail.gmail.com> (raw)
In-Reply-To: <8361e3ow7i.fsf@gnu.org>
Maybe it will be helpful to somebody in the future:
(use-global-map (make-sparse-keymap))
(global-set-key [t] #'self-insert-command)
(let ((c ?\s))
(while (< c ?\d)
(global-set-key (vector c) #'self-insert-command)
(setq c (1+ c)))
(when (eq system-type 'ms-dos)
(setq c 128)
(while (< c 160)
(global-set-key (vector c) #'self-insert-command)
(setq c (1+ c))))
(setq c 160)
(while (< c 256)
(global-set-key (vector c) #'self-insert-command)
(setq c (1+ c))))
Tested. This is how you totally wipe out default global bindings, but
preserve the very basic --- typing of printable characters from 8-bit ASCII
code page.
Best regards,
Alexander
next prev parent reply other threads:[~2014-11-25 21:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 11:09 How to truly unbind global bindings? Alexander Shukaev
2014-11-25 12:16 ` Alexander Shukaev
2014-11-25 15:43 ` Drew Adams
2014-11-25 16:09 ` Alexander Shukaev
2014-11-25 16:13 ` Drew Adams
2014-11-25 19:04 ` Alexander Shukaev
2014-11-25 19:31 ` Eli Zaretskii
2014-11-25 19:39 ` Alexander Shukaev
2014-11-25 19:50 ` Eli Zaretskii
2014-11-25 20:00 ` Alexander Shukaev
2014-11-25 20:34 ` Eli Zaretskii
2014-11-25 21:05 ` Alexander Shukaev [this message]
2014-11-26 2:57 ` Yuri Khan
2014-11-26 9:33 ` Alexander Shukaev
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKu-7Wy=g4gr_-HGe9Axz=4BUKGcCYF8L+Ah93oVVyzMVi5tQw@mail.gmail.com' \
--to=haroogan@gmail.com \
--cc=eliz@gnu.org \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.