[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/rcirc-update e17cc75 3/8: Add mouse properties to activity strin
From: |
Philip Kaludercic |
Subject: |
feature/rcirc-update e17cc75 3/8: Add mouse properties to activity string |
Date: |
Tue, 15 Jun 2021 12:46:41 -0400 (EDT) |
branch: feature/rcirc-update
commit e17cc751baa17f142fbc41710bf645f6fdc64a80
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add mouse properties to activity string
* rcirc.el (rcirc-activity-string): Allow clicking on string
---
lisp/net/rcirc.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 400facf..9fdbf12 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2211,7 +2211,6 @@ activity. Only run if the buffer is not visible and
(defvar rcirc-update-activity-string-hook nil
"Hook run whenever the activity string is updated.")
-;; TODO: add mouse properties
(defun rcirc-update-activity-string ()
"Update mode-line string."
(let* ((pair (rcirc-split-activity rcirc-activity))
@@ -2238,12 +2237,17 @@ activity. Only run if the buffer is not visible and
(let ((s (substring-no-properties (rcirc-short-buffer-name b))))
(with-current-buffer b
(dolist (type rcirc-activity-types)
- (rcirc-add-face 0 (length s)
- (cl-case type
+ (rcirc-facify s (cl-case type
(nick 'rcirc-track-nick)
- (keyword 'rcirc-track-keyword))
- s)))
- s))
+ (keyword 'rcirc-track-keyword)))))
+ (let ((map (make-mode-line-mouse-map
+ 'mouse-1
+ (lambda ()
+ (interactive)
+ (pop-to-buffer b)))))
+ (propertize s
+ 'mouse-face 'mode-line-highlight
+ 'local-map map))))
buffers ","))
(defun rcirc-short-buffer-name (buffer)
- feature/rcirc-update updated (fd96e3a -> 1181c60), Philip Kaludercic, 2021/06/15
- feature/rcirc-update a44e402 1/8: Preserve incoming order of messages with same timestamp, Philip Kaludercic, 2021/06/15
- feature/rcirc-update e61bdd5 2/8: Update activity string after switching to next active buffer, Philip Kaludercic, 2021/06/15
- feature/rcirc-update e17cc75 3/8: Add mouse properties to activity string,
Philip Kaludercic <=
- feature/rcirc-update f1e79a3 5/8: Rename set-rcirc-{encode, decode}-coding-system, Philip Kaludercic, 2021/06/15
- feature/rcirc-update 88e07af 4/8: Preserve order of completion during cycling, Philip Kaludercic, 2021/06/15
- feature/rcirc-update 3e31846 6/8: Fix construction of interactive specification in rcirc-define-command, Philip Kaludercic, 2021/06/15
- feature/rcirc-update 946ceca 7/8: Improve message markup, Philip Kaludercic, 2021/06/15
- feature/rcirc-update 1181c60 8/8: Check if server buffer is live, Philip Kaludercic, 2021/06/15