aboutsummaryrefslogtreecommitdiff
path: root/sx-question-print.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-12-18 15:25:17 -0500
committerSean Allred <code@seanallred.com>2014-12-18 15:25:17 -0500
commit78cac577fc93a6406a7cbfa2b86d33529f4bd6a7 (patch)
tree02fec2cb6e7867a36ac25aedac44ec6b290a92db /sx-question-print.el
parent641beffbc3ce72b4e1b9b6bbb79880ba795fdf72 (diff)
parent3be41a8af1f98abfc8b2a43ce09c08586bee1075 (diff)
Merge pull request #162 from vermiculus/comment-enhancement
Comment enhancement
Diffstat (limited to 'sx-question-print.el')
-rw-r--r--sx-question-print.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index 3d698cc..0a6c3a8 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -290,18 +290,22 @@ The comment is indented, filled, and then printed according to
(sx--wrap-in-overlay
(list 'sx--data-here comment-data)
(sx-assoc-let comment-data
- (insert
+ (when (> .score 0)
+ (insert (number-to-string .score)
+ (if (eq .upvoted t) "^" "")
+ " "))
+ (insert
(format
- sx-question-mode-comments-format
- (sx-question-mode--propertize-display-name .owner)
- (substring
- ;; We fill with three spaces at the start, so the comment is
- ;; slightly indented.
- (sx-question-mode--fill-and-fontify
- (concat " " .body_markdown))
- ;; Then we remove the spaces from the first line, since we'll
- ;; add the username there anyway.
- 3))))))
+ sx-question-mode-comments-format
+ (sx-question-mode--propertize-display-name .owner)
+ (substring
+ ;; We fill with three spaces at the start, so the comment is
+ ;; slightly indented.
+ (sx-question-mode--fill-and-fontify
+ (concat " " .body_markdown))
+ ;; Then we remove the spaces from the first line, since we'll
+ ;; add the username there anyway.
+ 3))))))
(defun sx-question-mode--insert-header (&rest args)
"Insert propertized ARGS.