From fdc0fc501fc347f2e772575695125fb0bb152d15 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 25 Nov 2014 22:49:53 +0000 Subject: Add sx--user-@name function to sx.el --- sx.el | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- cgit v1.2.3