From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.help Subject: Re: How to truly unbind global bindings? Date: Tue, 25 Nov 2014 22:05:35 +0100 Message-ID: References: <98be95d8-086a-4a28-aa34-937c53e2c4de@default> <838uizoz58.fsf@gnu.org> <837fyjoy9n.fsf@gnu.org> <8361e3ow7i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1416949569 1254 80.91.229.3 (25 Nov 2014 21:06:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2014 21:06:09 +0000 (UTC) Cc: help-gnu-emacs To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 25 22:06:02 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XtNJA-0006B3-W9 for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Nov 2014 22:06:01 +0100 Original-Received: from localhost ([::1]:59532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtNJA-0001Oi-Fb for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Nov 2014 16:06:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtNIv-0001Od-TM for help-gnu-emacs@gnu.org; Tue, 25 Nov 2014 16:05:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtNIu-00056u-S9 for help-gnu-emacs@gnu.org; Tue, 25 Nov 2014 16:05:45 -0500 Original-Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:37457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtNIm-0004tZ-R9; Tue, 25 Nov 2014 16:05:37 -0500 Original-Received: by mail-lb0-f179.google.com with SMTP id z11so1312263lbi.38 for ; Tue, 25 Nov 2014 13:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GLjLWvAej4mnlXYfQx/Fi/hoI8f6z1sSNP/cKRj5j68=; b=I4B1zkiE6ylRQct4KdDrMB8MlRYyi3nz1YGWORk07/SeKmU+C/OgZg+fDTzrGCsbIS 2vwPSHMoE/TFh9CjT7h8dzki/HuD7f4uO6rdXnlXqaPCtyzKbfxXfFqdpfG4zP0LiFOi 3xBFcuC/D591M/zGGw3/TA5fr7KGX9Nyxy+8jNFaYG7AgT/DFldCsM6KdtQ7pxk9ynG3 CDKTlgl2375rwGxnK5emblUDwOvdWD3PbKWz2EFnSRLB2Fv9npA8Jz47UocGXdbJ6gJm CirOVQOMNYKMTsgjHssvMeX6e+wJNXycxvJVsLq4qyKmPY4wiGrnYIvZDxQz35AYCgtI nILg== X-Received: by 10.152.43.103 with SMTP id v7mr6948889lal.29.1416949535993; Tue, 25 Nov 2014 13:05:35 -0800 (PST) Original-Received: by 10.112.21.136 with HTTP; Tue, 25 Nov 2014 13:05:35 -0800 (PST) In-Reply-To: <8361e3ow7i.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::233 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101194 Archived-At: 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