help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to truly unbind global bindings?


From: Alexander Shukaev
Subject: Re: How to truly unbind global bindings?
Date: Tue, 25 Nov 2014 22:05:35 +0100

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]