aboutsummaryrefslogtreecommitdiff
path: root/sx-question-print.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-question-print.el')
-rw-r--r--sx-question-print.el34
1 files changed, 1 insertions, 33 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index 0efea98..a8604e0 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -26,6 +26,7 @@
(require 'sx)
(require 'sx-question)
(require 'sx-babel)
+(require 'sx-user)
(defgroup sx-question-mode nil
"Customization group for sx-question-mode."
@@ -93,11 +94,6 @@
"Face used on the question tags in the question buffer."
:group 'sx-question-mode-faces)
-(defface sx-question-mode-author
- '((t :inherit font-lock-variable-name-face))
- "Face used for author names in the question buffer."
- :group 'sx-question-mode-faces)
-
(defface sx-question-mode-score
'((t))
"Face used for the score in the question buffer."
@@ -395,34 +391,6 @@ URL is used as 'help-echo and 'url properties."
'sx-button-copy url
:type 'sx-button-link))
-(defun sx--format-user (format-string user)
- "Use FORMAT-STRING to format the user object USER.
-The value is a copy of FORMAT-STRING, but with certain constructs
-replaced by text that describes the specified USER:
-
-%d is the display name.
-%l is the link to the profile.
-%r is the reputation.
-%a is the accept rate.
-
-The returned string is additionally propertized as a button with
-the `sx-button-user' category."
- (sx-assoc-let (append user sx-question-mode-fallback-user)
- (let* ((text (sx-format-replacements
- format-string
- `((?d . ,.display_name)
- (?l . ,.link)
- (?r . ,.reputation)
- (?a . ,.accept_rate))
- sx-user-property-alist)))
- (if link
- (insert-text-button text
- ;; For visiting and stuff.
- 'sx-button-url link
- 'sx-button-copy link
- :type 'sx-button-user)
- text))))
-
(defun sx-question-mode-find-reference (id &optional fallback-id)
"Find url identified by reference ID in current buffer.
If ID is nil, use FALLBACK-ID instead."