summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-10-08 17:21:54 -0500
committerCase Duckworth2021-10-08 17:21:54 -0500
commitcea77db0127d038b0d0728621ebea768ff832e09 (patch)
tree6715d140eb1c89a4ca848215f1e82706153fcd28 /lisp
parentHandle nil (diff)
downloademacs-cea77db0127d038b0d0728621ebea768ff832e09.tar.gz
emacs-cea77db0127d038b0d0728621ebea768ff832e09.zip
Add `circe-current-topic' and make topsy.el use it
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-circe.el16
1 files changed, 16 insertions, 0 deletions
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)