diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-14 13:42:29 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-14 13:42:29 +0000 |
commit | 8adc0ac710469949ac28aa664eef965ef179c290 (patch) | |
tree | 4765e454a7d68fcb82eb36d2b46e9cd87077c90b | |
parent | bc2c6b72e62cbcc1540ce4154760250273e05d04 (diff) |
Use the header-line as a UI guide on the question buffer.
-rw-r--r-- | sx-question-mode.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el index 5735f47..c45ef9f 100644 --- a/sx-question-mode.el +++ b/sx-question-mode.el @@ -175,12 +175,31 @@ property." ;;; Major-mode +(defvar sx-question-mode--header-line + '(" " + (:propertize "n p TAB" face mode-line-buffer-id) + ": Navigate" + " " + (:propertize "u d" face mode-line-buffer-id) + ": Up/Down Vote" + " " + (:propertize "c" face mode-line-buffer-id) + ": Comment" + " " + (:propertize "a" face mode-line-buffer-id) + ": Answer" + " " + (:propertize "e" face mode-line-buffer-id) + ": Edit") + "Header-line used on the question list.") + (define-derived-mode sx-question-mode special-mode "Question" "Major mode to display and navigate a question and its answers. Letters do not insert themselves; instead, they are commands. \\<sx-question-mode> \\{sx-question-mode}" + (setq header-line-format sx-question-mode--header-line) ;; Determine how to close this window. (unless (window-parameter nil 'quit-restore) (set-window-parameter |