aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-11-25 22:49:53 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-11-25 22:49:53 +0000
commitfdc0fc501fc347f2e772575695125fb0bb152d15 (patch)
tree61947bfa740511b1735a8a3ee053e4ad0e926085
parentecaf2877f88fbf77202ee5ab30c55831ff27c24d (diff)
Add sx--user-@name function to sx.el
-rw-r--r--sx.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/sx.el b/sx.el
index ac4758e..d4c3ac2 100644
--- a/sx.el
+++ b/sx.el
@@ -198,6 +198,13 @@ Return the result of BODY."
(add-text-properties p (point) ,properties)
result))
+(defun sx--user-@name (user)
+ "Get the `display_name' of USER prepended with @."
+ (sx-assoc-let user
+ (when (stringp .display_name)
+ (concat "@" .display_name))))
+
+
;;; Assoc-let
(defun sx--site (data)
"Get the site in which DATA belongs.