Skip to content

Commit

Permalink
Rename kubel-yaml-editing-map to kubel-yaml-editing-mode-map. (abroch…
Browse files Browse the repository at this point in the history
…ard#136)

In order to be picked by define-derived-mode, the map needs to have name
composed of the full mode name (including -mode) and -map suffix.  In my testing
it worked, because I already defined and eval-ed it before renaming.  Downsides
of REPL-based development I guess.

* kubel.el (kubel-yaml-editing-mode-map): Rename from kubel-yaml-editing-map.
  • Loading branch information
graywolf authored Aug 21, 2024
1 parent 33a4d1d commit 99fc8f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kubel.el
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ TYPENAME is the resource type/name."
(yes-or-no-p "Resource modified; kill anyway? "))
(kill-buffer (current-buffer))))

(defvar kubel-yaml-editing-map
(defvar kubel-yaml-editing-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c C-c") #'kubel-apply)
(define-key map (kbd "C-c C-k") #'kubel-kill-buffer)
Expand All @@ -669,7 +669,7 @@ TYPENAME is the resource type/name."
Allows simple apply of the changes made.
\\{kubel-yaml-editing-map}")
\\{kubel-yaml-editing-mode-map}")

(defun kubel-apply ()
"Save the current buffer to a temp file and try to kubectl apply it."
Expand Down

0 comments on commit 99fc8f1

Please sign in to comment.