diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-13 02:50:41 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-13 02:50:41 +0000 |
commit | e8a386babe35f85ecbc8e7d755a2d6bdbb545c6b (patch) | |
tree | 7e9aec24c6bd4c78753901c87150705ea96026f0 | |
parent | abc7daf8cf1429df699d27e4d3b240f79d53fcfa (diff) |
Define groups
-rw-r--r-- | sx-question-mode.el | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el index 2197338..5be5ab1 100644 --- a/sx-question-mode.el +++ b/sx-question-mode.el @@ -29,6 +29,16 @@ (require 'sx-lto) (require 'markdown-mode) +(defgroup sx-question-mode nil + "Customization group for sx-question-mode." + :prefix "sx-question-mode-" + :group 'sx) + +(defgroup sx-question-mode-faces nil + "Customization group for the faces of `sx-question-mode'." + :prefix "sx-question-mode-" + :group 'sx-question-mode) + ;;; Displaying a question (defvar sx-question-mode--window nil @@ -72,6 +82,7 @@ If WINDOW is given, use that to display the buffer." ;;; Printing a question's content +;;;; Faces and Variables (defvar sx-question-mode--overlays nil "") (make-variable-buffer-local 'sx-question-mode--overlays) @@ -252,12 +263,15 @@ Letters do not insert themselves; instead, they are commands. (mapc (lambda (x) (define-key sx-question-mode-map - (car x) (cadr x))) + (car x) (cadr x))) '(("n" sx-question-mode-next-section) ("p" sx-question-mode-previous-section) ("j" sx-question-mode-next-section) ("k" sx-question-mode-previous-section) - ("g" sx-question-mode-refresh))) + ("g" sx-question-mode-refresh) + ([spc] scroll-up-command) + ([s-spc] scroll-down-command) + ([backspace] scroll-down-command))) (defun sx-question-mode-refresh () "Refresh currently displayed question. |