From 47763771b5b1f196798ae0687c3900d1f83d92d4 Mon Sep 17 00:00:00 2001 From: Marcel van der Boom Date: Fri, 16 May 2014 23:08:12 +0200 Subject: [PATCH] Define a mode for posting and its keymap that goes with it. --- twister.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/twister.el b/twister.el index 763ffec..f3760b6 100644 --- a/twister.el +++ b/twister.el @@ -74,6 +74,19 @@ in the twister configuration." :type 'integer :group 'twister) +(defvar twister-post-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-c" 'twister-post-buffer) + map) + "Keymap for `twister-post-mode'.") + +(define-derived-mode twister-post-mode text-mode "twister-post" + "Twister major mode for posting new messages." + ;; Reason I want this: + ;; - define autompletion on @ sign + ;; - define specific key map for posting messages + ) + ;; Preliminary convention ;; tw-* methods -> sorta private for now, don't use directly ;; twister-* methods -> public API