summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el7
-rw-r--r--lisp/acdw-circe.el16
2 files changed, 22 insertions, 1 deletions
diff --git a/init.el b/init.el index b376d55..c68ea1e 100644 --- a/init.el +++ b/init.el
@@ -1178,8 +1178,13 @@ specific to most general, they are these:
1178 ;; circe-my-message-face 1178 ;; circe-my-message-face
1179 ;; ((t (:inherit (modus-themes-slant)))) 1179 ;; ((t (:inherit (modus-themes-slant))))
1180 )) 1180 ))
1181
1182 (with-eval-after-load 'topsy
1183 (:option (append topsy-mode-functions)
1184 '(circe-channel-mode . circe-current-topic)))
1181 1185
1182 (:bind "C-c C-p" #'circe-command-PART 1186 (:bind "C-c C-p" #'circe-command-PART
1187 "C-c C-t" #'circe-current-topic ; in acdw-circe.el
1183 "C-l" #'lui-track-jump-to-indicator 1188 "C-l" #'lui-track-jump-to-indicator
1184 "<C-return>" #'circe-chat@set-prompt) 1189 "<C-return>" #'circe-chat@set-prompt)
1185 1190
@@ -1197,7 +1202,7 @@ specific to most general, they are these:
1197 (:bind "C-c C-s" #'circe-command-SLAP) 1202 (:bind "C-c C-s" #'circe-command-SLAP)
1198 1203
1199 (autoload 'circe-nick-color-reset "circe-color-nicks") 1204 (autoload 'circe-nick-color-reset "circe-color-nicks")
1200 (add-hook 'modus-themes-after-load-theme-hook 1205 (add-hook 'modus-themes-after-theme-hook
1201 #'circe-nick-color-reset) 1206 #'circe-nick-color-reset)
1202 1207
1203 (:with-mode lui-mode 1208 (:with-mode lui-mode
diff --git a/lisp/acdw-circe.el b/lisp/acdw-circe.el index d6f5b90..ec15f8e 100644 --- a/lisp/acdw-circe.el +++ b/lisp/acdw-circe.el
@@ -8,6 +8,22 @@
8 8
9(require 'circe) 9(require 'circe)
10 10
11;;; Functions
12
13(defun circe-current-topic (&optional message)
14 "Return the topic of the current channel.
15When called with MESSAGE set to non-nil (or interactively), also
16message the current topic."
17 (interactive "p")
18 (let ((topic
19 (save-excursion
20 (re-search-backward (rx "*** Topic for #" (+ (or word "-")) ": "))
21 (buffer-substring-no-properties
22 (match-end 0) (line-end-position)))))
23 (when message
24 (message "%s" topic))
25 topic))
26
11;;; Chat commands 27;;; Chat commands
12 28
13(defun circe-command-SHORTEN (url) 29(defun circe-command-SHORTEN (url)