Message prefixes now have context face.
[lurk.git] / lurk.el
diff --git a/lurk.el b/lurk.el
index 9563237..a8f8a7a 100644 (file)
--- a/lurk.el
+++ b/lurk.el
@@ -442,11 +442,13 @@ portion of the source component of the message, as LURK doesn't use this.")
                    (if (equal to lurk-nick) from to))))
     (lurk-display-string
      context
-     (pcase (lurk-get-context-type to)
-       ('channel (concat to " <" from ">"))
-       ('nick (concat "[" from " -> " to "]"))
-       (_
-        (error "Unsupported context type")))
+     (propertize
+      (pcase (lurk-get-context-type to)
+        ('channel (concat to " <" from ">"))
+        ('nick (concat "[" from " -> " to "]"))
+        (_
+         (error "Unsupported context type")))
+      'face (lurk-get-context-facelist context))
      text)))
 
 (defun lurk-display-action (from to action-text)
@@ -509,8 +511,9 @@ portion of the source component of the message, as LURK doesn't use this.")
        (opt (group (: ":" (+ digit))))
        (opt (group (: "/"
                       (opt
-                       (* (any alnum ",.-~/@|:%#=&_"))
-                       (+ (any alnum "-~/@|:%#=&")))))))))
+                       (* (any alnum "-/.,#:%=&_"))
+                       (any alnum "-/#:%=&_")))))))
+  "Imperfect regex used to find URLs in plain text.")
 
 (defun lurk-click-url (button)
   (browse-url (button-get button 'url)))