From e63a29e71d645e67275cb962ec0839e61da90863 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Fri, 27 Feb 2015 17:59:54 -0300 Subject: Add mode-line info for closed questions. --- sx-question-print.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sx-question-print.el') 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 -- cgit v1.2.3