Commit 80e7b471 authored by Brian Fox's avatar Brian Fox
Browse files

(suppress-keymap): Use substitute-key-definition instead of manually

checking each key (we were using 127 instead of 255 anyway).
parent fc68b552
......@@ -111,11 +111,7 @@ If ALL-FRAMES is neither nil nor t, stick strictly to the selected frame."
"Make MAP override all normally self-inserting keys to be undefined.
Normally, as an exception, digits and minus-sign are set to make prefix args,
but optional second arg NODIGITS non-nil treats them like other chars."
(let ((i 0))
(while (<= i 127)
(if (eql (lookup-key global-map (char-to-string i)) 'self-insert-command)
(define-key map (char-to-string i) 'undefined))
(setq i (1+ i))))
(substitute-key-definition 'self-insert-command 'undefined map global-map)
(or nodigits
(let (loop)
(define-key map "-" 'negative-argument)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment