diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-07 16:36:35 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-07 16:36:35 -0200 |
commit | 09423c2e8f40638a8438cd76783a21d0eb7ed492 (patch) | |
tree | 5f4dacc047925085724202d897d5d57f90973355 /sx-user.el | |
parent | 74790a11bc19fbdeae054816962b2160461767f4 (diff) |
Add %@ support to sx-user--format
Diffstat (limited to 'sx-user.el')
-rw-r--r-- | sx-user.el | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -125,6 +125,7 @@ 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. +%@ is the display name in a format suitable for @mentions. %l is the link to the profile. %r is the reputation. %a is the accept rate. @@ -138,7 +139,10 @@ the `sx-button-user' category." (?n . ,\.display_name) (?l . ,\.link) (?r . ,\.reputation) - (?a . ,\.accept_rate)) + (?a . ,\.accept_rate) + (?@ . ,(when (string-match "%@" format-string) + (sx-user--@name .display_name))) + ) sx-user--format-property-alist))) (if (> 0 (string-width .link)) (insert-text-button text |