diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-27 17:59:54 -0300 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-27 18:52:17 -0300 |
commit | e63a29e71d645e67275cb962ec0839e61da90863 (patch) | |
tree | 7def83a50620ae933c603500ebc6c34bb8092e73 /sx-question-print.el | |
parent | 382fd490f71e00cc293e2ab98cfb7b7b1c59c201 (diff) |
Add mode-line info for closed questions.
Diffstat (limited to 'sx-question-print.el')
-rw-r--r-- | sx-question-print.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sx-question-print.el b/sx-question-print.el index 32a0813..9e726b4 100644 --- a/sx-question-print.el +++ b/sx-question-print.el @@ -201,6 +201,10 @@ type is not available, images won't work." ;;; Functions ;;;; Printing the general structure +(defconst sx-question-mode--closed-mode-line-string + '(:propertize " [CLOSED] " face font-lock-warning-face) + "String indicating closed questions in the mode-line.") + (defun sx-question-mode--print-question (question) "Print a buffer describing QUESTION. QUESTION must be a data structure returned by `json-read'." @@ -213,6 +217,7 @@ QUESTION must be a data structure returned by `json-read'." ;; Print everything (sx-assoc-let question (when .closed_reason + (add-to-list 'mode-line-format sx-question-mode--closed-mode-line-string) (sx-question-mode--print-close-reason .closed_reason .closed_date)) (sx-question-mode--print-section question) (mapc #'sx-question-mode--print-section |