Function: suppress-keymap
suppress-keymap is a byte-compiled function defined in subr.el.gz.
Signature
(suppress-keymap MAP &optional NODIGITS)
Documentation
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.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun suppress-keymap (map &optional nodigits)
"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."
(define-key map [remap self-insert-command] #'undefined)
(or nodigits
(let (loop)
(define-key map "-" #'negative-argument)
;; Make plain numbers do numeric args.
(setq loop ?0)
(while (<= loop ?9)
(define-key map (char-to-string loop) #'digit-argument)
(setq loop (1+ loop))))))