branch: elpa/fedi
commit 93c866062b48b0dd4c37afc7fb2e281457554246
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    refactor propertize link plist
---
 fedi.el | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/fedi.el b/fedi.el
index efebcba7e6f..f27da33daf9 100644
--- a/fedi.el
+++ b/fedi.el
@@ -728,20 +728,24 @@ used in a link function. For an example of regexes' 
subgroups, see
                          link)))
             (add-text-properties beg
                                  end
-                                 `(face ,(or face '(shr-text shr-link))
-                                        mouse-face highlight
-                                        shr-tabstop t
-                                        shr-url ,link
-                                        button t
-                                        type ,type
-                                        item ,item
-                                        category shr
-                                        follow-link t
-                                        help-echo ,item-str
-                                        keymap ,keymap))
+                                 (fedi-link-props face link item type item-str 
keymap))
             (add-text-properties beg end
                                  extra-props)))))
     (buffer-string)))
 
+(defun fedi-link-props (&optional face link item type help-echo keymap)
+  "Return a plist for a link."
+  `(face ,(or face '(shr-text shr-link))
+         mouse-face highlight
+         shr-tabstop t
+         shr-url ,link
+         button t
+         type ,type
+         item ,item
+         category shr
+         follow-link t
+         help-echo ,help-echo
+         keymap ,keymap))
+
 (provide 'fedi)
 ;;; fedi.el ends here

Reply via email to