aboutsummaryrefslogtreecommitdiff
path: root/sx-question-print.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-12-03 14:39:53 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-12-03 14:39:53 +0000
commit21e526919594fcb89b298366c210fb54676e7e9a (patch)
treefe76d354fcaaa16c649261735512666051e1c4db /sx-question-print.el
parent46de3f0ddba5a7611f025b816d637136593b20b1 (diff)
parent07dc04e1e5111fff7f2905a155271edde3ce754c (diff)
Merge branch 'master' into answering
Conflicts: sx-question-list.el sx-question-print.el sx-tab.el
Diffstat (limited to 'sx-question-print.el')
-rw-r--r--sx-question-print.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index f206f56..eb79a7a 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))
@@ -179,7 +184,10 @@ QUESTION must be a data structure returned by `json-read'."
(mapc #'sx-question-mode--print-section .answers))
(insert "\n\n ")
(insert-text-button "Write an Answer" :type 'sx-button-answer)
- ;; Reposition
+ ;; Display weird chars correctly
+ (set-buffer-multibyte nil)
+ (set-buffer-multibyte t)
+ ;; Go up
(goto-char (point-min))
(sx-question-mode-next-section))
@@ -213,7 +221,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