From: Joe Wreschnig Date: Sun, 30 Jul 2017 13:15:17 +0000 (+0200) Subject: Define pelican-mode-map implicitly and inline. X-Git-Tag: v20170807~30 X-Git-Url: https://git.korewanetadesu.com/?a=commitdiff_plain;h=4ca7a5e4ca52b91c164c2a077fdf2827429072b9;p=pelican-mode.git Define pelican-mode-map implicitly and inline. --- diff --git a/pelican-mode.el b/pelican-mode.el index e0f5223..6e1ff8a 100644 --- a/pelican-mode.el +++ b/pelican-mode.el @@ -213,30 +213,19 @@ the unquoted printed representation of it is used: (interactive) (pelican-make "rsync_upload")) -(defconst pelican-keymap (make-sparse-keymap) - "The default keymap used in Pelican mode.") -(define-key pelican-keymap (kbd "C-c P n") - 'pelican-insert-auto-header) -(define-key pelican-keymap (kbd "C-c P p") - 'pelican-publish-draft) -(define-key pelican-keymap (kbd "C-c P t") - 'pelican-update-date) -(define-key pelican-keymap (kbd "C-c P h") - 'pelican-make-html) -(define-key pelican-keymap (kbd "C-c P u") - 'pelican-make-rsync-upload) - - ;;;###autoload (define-minor-mode pelican-mode "Toggle Pelican mode. Interactively with no argument, this command toggles the mode. for editing Pelican site files." - :init-value nil :lighter " Pelican" - :keymap pelican-keymap - :group 'pelican) + :group 'pelican + :keymap `((,(kbd "C-c P n") . pelican-insert-auto-header) + (,(kbd "C-c P p") . pelican-publish-draft) + (,(kbd "C-c P t") . pelican-update-date) + (,(kbd "C-c P h") . pelican-make-html) + (,(kbd "C-c P u") . pelican-make-rsync-upload))) ;;;###autoload (defun pelican-enable-if-site ()