diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw-circe.el | 16 |
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. | ||
15 | When called with MESSAGE set to non-nil (or interactively), also | ||
16 | message 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) |