Timeline for Encountering void-variable sh-mode-map for define-key
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 25, 2023 at 19:32 | comment | added | Drew |
I don't understand your comment questions (and please post questions separately). Loading the file that defines the map "sets" the map. If you want to change the bindings (e.g., add to them) then the bindings have to exist. If you only want to replace all bindings that the library will define then you can just put your own defvar in your code, and not bother with require ing the library - it will anyway be loaded when you use the mode, and its defvar will then be ignored.
|
|
Jun 25, 2023 at 18:09 | vote | accept | Dilna | ||
Jun 25, 2023 at 17:21 | comment | added | Dilna | Would you suggest to set the major mode keymap only after loading the elisp file or bash script file? | |
Jun 25, 2023 at 16:36 | comment | added | Dilna | Is this the only way to define the keybindings or am I making things difficult for myself ? | |
Jun 25, 2023 at 16:29 | comment | added | Drew | Probably. The library defining the mode likely defines its keymap. If you expect the keymap to be defined you need to either define it yourself or load the code that defines it. | |
Jun 25, 2023 at 15:25 | comment | added | Dilna | Would I need to do the same for all possible major mode inputs ? | |
Jun 25, 2023 at 15:18 | history | edited | Drew | CC BY-SA 4.0 |
added 618 characters in body
|
Jun 25, 2023 at 15:11 | history | answered | Drew | CC BY-SA 4.0 |