Problem:
Two which-key functions doc-strings, state that they are obsolete:
(which-key-declare-prefixes KEY-SEQUENCE REPLACEMENT &rest MORE)
This function is obsolete since 2016-10-05;
use ‘which-key-add-key-based-replacements’ instead.
(which-key-declare-prefixes-for-mode MODE KEY-SEQUENCE REPLACEMENT &rest MORE)
This function is obsolete since 2016-10-05;
use ‘which-key-add-major-mode-key-based-replacements’ instead.
Solution:
Replace the obsolete functions.
Searching with `SPC /` through the .emacs.d folder, didn't find any other
occurrences of these functions.
Before this <tab> => TAB if there is no binding for <tab>, but then
`spacemacs/translate-C-i` turned this into <C-i>, which we don't want
because that would mean having to always bind <tab> when this option is
enabled. This commit adds a check to make sure we can't possibly be
translating from <tab> originally (we only want to capture the C-i
events in the GUI).
Also, fixes C-m translation but leaves it commented.
Added dotfile variable to template and core-dotspacemacs.el
After enabling, if C-i is translated to the "key" <C-i> which allows you
to bind a separate command in the GUI like this
(define-key map [C-i] 'c-i-command)
or this
(define-key map (kbd "<C-i>") 'c-i-command)
This has the side effect of no longer making C-i default to TAB in the
GUI, but will not affect the TAB or <tab> bindings.
Removes spacemacs//handle-terminal-keys
Add request.el to core/libs
Refactor package.el initialization in configuration-layer.el
Cosmetic improvements to loading messages
Remove redefinition of package-refresh-packages
This pre-command-hook translates the special key to the corresponding
emacs function key. This effects only happens in terminal, this hook is
a no-op in GUI.
By doing this we attempt to bring more consistency between the GUI
and the terminal regarding TAB and RET keys.
spacemacs/set-key
spacemacs/set-key-for-state
These functions find normalized keys which should handle as sanely as
possible the GUI and the terminal.
See docstring of spacemacs//normalize-key for more info.
The dotfile says that setting the major-mode leaders to nil will disable
the functionality, but there were a couple of places where that option
was not being respected.
This is how evil-leader gets `SPC m` to work for mode specific bindings,
and we need to mirror this step for `M-m`. This is big change, but in
order for `M-m` to work properly we need to remap it to the mode-map
whenever possible.