emacs-devel
[Top][All Lists]
Advanced

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

Re: Making a key undefined again


From: Gregory Heytings
Subject: Re: Making a key undefined again
Date: Mon, 25 Oct 2021 17:48:27 +0000



Actually, it didn't make it clear for me. I hope I understand the differences between an `undefined` binding, a `nil ` binding, and no binding at all, but I don't know why unsetting a key is important and even less when unsetting it by making it have no binding at all is necessary.


I'm not sure I understand what Jonas wants, but here's what I understood:

1. (define-key lisp-interaction-mode-map "\C-j" nil)

means that in *scratch* C-j becomes electric-newline-and-maybe-indent (in global-map);

2. (define-key lisp-interaction-mode-map "\C-j" #'undefined)

means that in *scratch* C-j displays "C-j is undefined";

3. (define-key lisp-interaction-mode-map "\C-j" (lambda () (interactive)))

means that in *scratch* C-j does nothing.



reply via email to

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