Emacs Lisp - Should You Disable Keys Before Configuring Them?
2 answers
There is absolutely no need to turn off the key before configuring it.
It's like setting a variable in any programming language: you don't have to do foo = NULL
before foo = x
. This comparison is closer than one might think, because it (global-unset-key k)
coincides with (global-set-key k nil)
.
+7
source to share
Like sds saied, global-unset-key
it actually calls global-set-key
:
(defun global-unset-key (key)
"Remove global binding of KEY.
KEY is a string or vector representing a sequence of keystrokes."
(interactive "kUnset key globally: ")
(global-set-key key nil))
so there is no real difference between the set command and the unset key.
+3
source to share