aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-12-01 11:16:12 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-12-01 11:16:12 +0000
commit550fbb3297600fc68101d61ddd3f7226a2e9a156 (patch)
tree38fc571a1ec54c679392d1f53bfc690042cdf38a
parent570a41fbc7e7ff6f842d6bb809bc36c457784ebf (diff)
parent7d6110a64c3b9e6d95a2976b8423ab26fe312b2c (diff)
Merge pull request #101 from vermiculus/issue-100
Default to post author if post editor is missing
-rw-r--r--sx-question-print.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index 9245331..5b29521 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -43,6 +43,11 @@
;;; Faces and Variables
+(defcustom sx-question-mode-deleted-user
+ '((display_name . "(deleted user)"))
+ "The structure used to represent a deleted account."
+ :type '(alist :options ((display_name string)))
+ :group 'sx-question-mode)
(defface sx-question-mode-header
'((t :inherit font-lock-variable-name-face))
@@ -231,7 +236,8 @@ DATA can represent a question or an answer."
(when .last_edit_date
(format sx-question-mode-last-edit-format
(sx-time-since .last_edit_date)
- (sx-question-mode--propertize-display-name .last_editor))))
+ (sx-question-mode--propertize-display-name
+ (or .last_editor sx-question-mode-deleted-user)))))
'sx-question-mode-date)
(sx-question-mode--insert-header
sx-question-mode-header-score