From 39706412e070cabe201905b9e6980a5a20aae9e0 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 4 Nov 2014 09:02:13 +0000 Subject: Make " ago" into a customizable varible. --- stack-question-list.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'stack-question-list.el') diff --git a/stack-question-list.el b/stack-question-list.el index 1a19b44..1a23cde 100644 --- a/stack-question-list.el +++ b/stack-question-list.el @@ -144,6 +144,12 @@ If REDISPLAY is non-nil, also call `tabulated-list-print'." (mapcar #'stack-question-list--print-info question-list))) (when redisplay (tabulated-list-print 'remember))) +(defcustom stack-question-list-ago-string " ago" + "String appended to descriptions of the time since something happened. +Used in the questions list to indicate a question was updated \"4d ago\"." + :type 'string + :group 'stack-question-list) + (defun stack-question-list--print-info (data) "Convert `json-read' DATA into tabulated-list format." (cl-flet ((ca (x) (cdr (assoc x data)))) @@ -165,7 +171,8 @@ If REDISPLAY is non-nil, also call `tabulated-list-print'." 'stack-question-list-read-question 'stack-question-list-unread-question)) (propertize " " 'display "\n ") - (propertize (concat (stack--time-since (ca 'last_activity_date)) " ago") + (propertize (concat (stack--time-since (ca 'last_activity_date)) + stack-question-list-ago-string) 'face 'stack-question-list-date) (propertize (concat " [" (mapconcat #'identity (ca 'tags) "] [") "]") 'face 'stack-question-list-tags) -- cgit v1.2.3