summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-09-23 17:09:46 -0500
committerCase Duckworth2021-09-23 17:09:46 -0500
commit10b8c209782448bdc0ca4abcc19cda32ce41505b (patch)
tree249c13c00c25f912e921f4178f5b605a2df6d967 /lisp
parentBreak out cus-edit functions (diff)
downloademacs-10b8c209782448bdc0ca4abcc19cda32ce41505b.tar.gz
emacs-10b8c209782448bdc0ca4abcc19cda32ce41505b.zip
Add circe-command-SHORTEN
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-irc.el35
1 files changed, 35 insertions, 0 deletions
diff --git a/lisp/acdw-irc.el b/lisp/acdw-irc.el index 305dc93..1fc7482 100644 --- a/lisp/acdw-irc.el +++ b/lisp/acdw-irc.el
@@ -139,6 +139,41 @@ already been connected to."
139 circe-chat-target 139 circe-chat-target
140 "ACTION" line)))) 140 "ACTION" line))))
141 141
142(defun circe-command-SHORTEN (url)
143 "Shorten URL using `0x0-shorten-uri'."
144 (interactive "sURL to shorten: ")
145 ;; TODO: enable /shorten URL comment syntax
146 (let ((short-url (0x0-shorten-uri (0x0--choose-server) url)))
147 (circe-command-SAY short-url)))
148
149(defun circe-part@kill-buffer (&rest _)
150 (let ((circe-channel-killed-confirmation nil))
151 (kill-buffer)))
152
153(defun circe-quit@kill-buffer (&rest _)
154 ;; `circe-server-killed-confirmation' set to nil, and manually
155 ;; deleting all chat buffers, pending Github issue #402
156 ;; (https://github.com/emacs-circe/circe/issues/402)
157 (let ((circe-server-killed-confirmation nil))
158 (with-circe-server-buffer
159 (dolist (buf (circe-server-chat-buffers))
160 (let ((circe-channel-killed-confirmation nil))
161 (kill-buffer buf)))
162 (kill-buffer))))
163
164(defun circe-gquit@kill-buffer (&rest _)
165 ;; `circe-server-killed-confirmation' set to nil, and manually
166 ;; deleting all chat buffers, pending Github issue #402
167 ;; (https://github.com/emacs-circe/circe/issues/402)
168 (let ((circe-server-killed-confirmation nil))
169 (dolist (buf (circe-server-buffers))
170 (with-current-buffer buf
171 (dolist (buf (circe-server-chat-buffers))
172 (let ((circe-channel-killed-confirmation nil))
173 (kill-buffer buf)))
174 (message "%s: %s" buf circe-server-killed-confirmation)
175 (kill-buffer)))))
176
142 177
143(provide 'acdw-irc) 178(provide 'acdw-irc)
144;;; acdw-irc.el ends here 179;;; acdw-irc.el ends here