Created
October 22, 2008 07:09
-
-
Save ivey/18566 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-erc-joined-channels () | |
"Return all the channels you're in as a list. This does not include queries." | |
(save-excursion | |
;; need to get out of ERC mode so we can have *all* channels returned | |
(set-buffer "*scratch*") | |
(mapcar #'(lambda (chanbuf) | |
(with-current-buffer chanbuf (erc-default-target))) | |
(erc-channel-list erc-process)))) | |
(defun mark-channel (channel) | |
(save-excursion | |
(set-buffer (get-buffer-create channel)) | |
(goto-char (point-max)) | |
(forward-line -1) | |
(end-of-line) | |
(let ((inhibit-read-only t)) | |
(insert "\n<<<<<<<< MARK >>>>>>>>") | |
(center-line)))) | |
(defun mark-all-channels () | |
(interactive) | |
(mapcar #'mark-channel (my-erc-joined-channels))) | |
(define-key erc-mode-map "\C-cm" 'mark-all-channels) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment