aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-07 14:22:28 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-07 15:48:31 -0200
commit5584905198e5f3b4db68cdd9373b4172885d0d43 (patch)
tree3cd7cb66e173ae1352685efc70133d9d44a19690
parent77c0fa3803d3f6827dd6287fdbee70405c7a146a (diff)
Use fallback user in sx--format-user
-rw-r--r--sx-question-print.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index 0bf5479..e4b8850 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -420,14 +420,14 @@ replaced by text that describes the specified USER:
The returned string is additionally propertized as a button with
the `sx-button-user' category."
- (let-alist user
- (let* ((link (or .link ""))
- (text (sx-format-replacements
+ (sx-assoc-let (append user sx-question-mode-fallback-user)
+ (let* ((text (sx-format-replacements
format-string
- `((?d . ,(or .display_name "Unknown user"))
- (?l . ,link)
- (?r . ,(number-to-string (or .reputation 0)))
- (?a . ,(number-to-string (or .accept_rate 0)))))))
+ `((?d . ,.display_name)
+ (?l . ,.link)
+ (?r . ,.reputation)
+ (?a . ,.accept_rate))
+ sx-user-property-alist)))
(if link
(insert-text-button text
;; For visiting and stuff.