about summary refs log tree commit diff stats
path: root/lisp/+circe.el
diff options
context:
space:
mode:
authorCase Duckworth2021-12-19 22:11:39 -0600
committerCase Duckworth2021-12-19 22:11:39 -0600
commitcf0ae4b20cb8375046266214ba918fb3cc8a2cc0 (patch)
tree1a5bd765f88ca4182e9caac8801b1b81d1841a0f /lisp/+circe.el
parentRequire `+ace-window' (diff)
downloademacs-cf0ae4b20cb8375046266214ba918fb3cc8a2cc0.tar.gz
emacs-cf0ae4b20cb8375046266214ba918fb3cc8a2cc0.zip
Changes and shit
Diffstat (limited to 'lisp/+circe.el')
-rw-r--r--lisp/+circe.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/+circe.el b/lisp/+circe.el index d9ea9cf..9078907 100644 --- a/lisp/+circe.el +++ b/lisp/+circe.el
@@ -48,7 +48,21 @@
48(defun +circe-current-topic (&optional message) 48(defun +circe-current-topic (&optional message)
49 "Return the topic of the current channel. 49 "Return the topic of the current channel.
50When called with optional MESSAGE non-nil, or interactively, also 50When called with optional MESSAGE non-nil, or interactively, also
51message the current topic.") 51message the current topic."
52 (interactive "p")
53 (let ((topic
54 (save-excursion
55 (goto-char (point-max))
56 (or (re-search-backward
57 (rx (group "*** "
58 (or "Topic" "topic" "TOPIC")
59 (* (not ":")) ": ")
60 (group (+ nonl)))))
61 (buffer-substring-no-properties
62 (match-beginning 2) (match-end 2)))))
63 (when message
64 (message "%s" topic))
65 topic))
52 66
53;;; Formatting messages 67;;; Formatting messages
54 68