Add `circe-current-topic' and make topsy.el use it
This commit is contained in:
parent
21fa2d0711
commit
cea77db012
7
init.el
7
init.el
|
@ -1178,8 +1178,13 @@ specific to most general, they are these:
|
|||
;; circe-my-message-face
|
||||
;; ((t (:inherit (modus-themes-slant))))
|
||||
))
|
||||
|
||||
(with-eval-after-load 'topsy
|
||||
(:option (append topsy-mode-functions)
|
||||
'(circe-channel-mode . circe-current-topic)))
|
||||
|
||||
(:bind "C-c C-p" #'circe-command-PART
|
||||
"C-c C-t" #'circe-current-topic ; in acdw-circe.el
|
||||
"C-l" #'lui-track-jump-to-indicator
|
||||
"<C-return>" #'circe-chat@set-prompt)
|
||||
|
||||
|
@ -1197,7 +1202,7 @@ specific to most general, they are these:
|
|||
(:bind "C-c C-s" #'circe-command-SLAP)
|
||||
|
||||
(autoload 'circe-nick-color-reset "circe-color-nicks")
|
||||
(add-hook 'modus-themes-after-load-theme-hook
|
||||
(add-hook 'modus-themes-after-theme-hook
|
||||
#'circe-nick-color-reset)
|
||||
|
||||
(:with-mode lui-mode
|
||||
|
|
|
@ -8,6 +8,22 @@
|
|||
|
||||
(require 'circe)
|
||||
|
||||
;;; Functions
|
||||
|
||||
(defun circe-current-topic (&optional message)
|
||||
"Return the topic of the current channel.
|
||||
When called with MESSAGE set to non-nil (or interactively), also
|
||||
message the current topic."
|
||||
(interactive "p")
|
||||
(let ((topic
|
||||
(save-excursion
|
||||
(re-search-backward (rx "*** Topic for #" (+ (or word "-")) ": "))
|
||||
(buffer-substring-no-properties
|
||||
(match-end 0) (line-end-position)))))
|
||||
(when message
|
||||
(message "%s" topic))
|
||||
topic))
|
||||
|
||||
;;; Chat commands
|
||||
|
||||
(defun circe-command-SHORTEN (url)
|
||||
|
|
Loading…
Reference in New Issue