about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-28 16:20:55 -0500
committerCase Duckworth2021-09-28 16:20:55 -0500
commitd19fb84fbbdc1363a52cc3bd3723e4dda75812f3 (patch)
tree23a4f95fe04363fac5ac95d28c7f7e315a5fa3da /init.el
parentMerge branch 'main' of tildegit.org:acdw/emacs (diff)
downloademacs-d19fb84fbbdc1363a52cc3bd3723e4dda75812f3.tar.gz
emacs-d19fb84fbbdc1363a52cc3bd3723e4dda75812f3.zip
Add acdw-circe.el
Diffstat (limited to 'init.el')
-rw-r--r--init.el48
1 files changed, 6 insertions, 42 deletions
diff --git a/init.el b/init.el index 11c9e71..a5efd8b 100644 --- a/init.el +++ b/init.el
@@ -1026,9 +1026,9 @@ specific to most general, they are these:
1026(setup (:straight circe) 1026(setup (:straight circe)
1027 (require 'circe) 1027 (require 'circe)
1028 (require 'acdw-irc) 1028 (require 'acdw-irc)
1029 (:also-load acdw-circe)
1029 1030
1030 (:option acdw-irc/left-margin 20 1031 (:option acdw-irc/left-margin 20
1031 acdw-irc/post-my-nick "-> "
1032 circe-channel-killed-confirmation nil 1032 circe-channel-killed-confirmation nil
1033 circe-color-nicks-everywhere t 1033 circe-color-nicks-everywhere t
1034 circe-default-nick "acdw" 1034 circe-default-nick "acdw"
@@ -1084,44 +1084,9 @@ specific to most general, they are these:
1084 (:bind "C-c C-p" #'circe-command-PART 1084 (:bind "C-c C-p" #'circe-command-PART
1085 "C-l" #'lui-track-jump-to-indicator) 1085 "C-l" #'lui-track-jump-to-indicator)
1086 1086
1087 (:advise circe-command-PART :after 1087 (:advise circe-command-PART :after #'circe-part@kill-buffer
1088 (defun circe-part@kill-buffer (&rest _) 1088 circe-command-QUIT :after #'circe-quit@kill-buffer
1089 (let ((circe-channel-killed-confirmation nil)) 1089 circe-command-GQUIT :after #'circe-gquit@kill-buffer)
1090 (kill-buffer)))
1091
1092 circe-command-QUIT :after
1093 (defun circe-quit@kill-buffer (&rest _)
1094 ;; `circe-server-killed-confirmation' set to nil, and manually
1095 ;; deleting all chat buffers, pending Github issue #402
1096 ;; (https://github.com/emacs-circe/circe/issues/402)
1097 (let ((circe-server-killed-confirmation nil))
1098 (with-circe-server-buffer
1099 (dolist (buf (circe-server-chat-buffers))
1100 (let ((circe-channel-killed-confirmation nil))
1101 (kill-buffer buf)))
1102 (kill-buffer))))
1103
1104 circe-command-GQUIT :after
1105 (defun circe-gquit@kill-buffer (&rest _)
1106 ;; `circe-server-killed-confirmation' set to nil, and manually
1107 ;; deleting all chat buffers, pending Github issue #402
1108 ;; (https://github.com/emacs-circe/circe/issues/402)
1109 (let ((circe-server-killed-confirmation nil))
1110 (dolist (buf (circe-server-buffers))
1111 (with-current-buffer buf
1112 (dolist (buf (circe-server-chat-buffers))
1113 (let ((circe-channel-killed-confirmation nil))
1114 (kill-buffer buf))
1115 (cancel-timer 'irc-send--queue))
1116 (message "%s: %s" buf circe-server-killed-confirmation)
1117 (kill-buffer))))))
1118
1119 (defun circe-command-SHORTEN (url)
1120 "Shorten URL using `0x0-shorten-uri'."
1121 (interactive "sURL to shorten: ")
1122 ;; TODO: enable /shorten URL comment syntax
1123 (let ((short-url (0x0-shorten-uri (0x0--choose-server) url)))
1124 (circe-command-SAY short-url)))
1125 1090
1126 (:with-mode circe-chat-mode 1091 (:with-mode circe-chat-mode
1127 (:hook #'acdw/stop-paren-annoyances 1092 (:hook #'acdw/stop-paren-annoyances
@@ -1132,12 +1097,11 @@ specific to most general, they are these:
1132 (lui-set-prompt 1097 (lui-set-prompt
1133 (concat 1098 (concat
1134 (propertize 1099 (propertize
1135 (acdw-irc/margin-format (buffer-name) "" ">") 1100 (acdw-irc/margin-format (buffer-name) " " "> ")
1136 'face 'circe-prompt-face 1101 'face 'circe-prompt-face
1137 'read-only t 1102 'read-only t
1138 'intangible t 1103 'intangible t
1139 'cursor-intangible t) 1104 'cursor-intangible t))))))
1140 " ")))))
1141 1105
1142 (autoload 'circe-nick-color-reset "circe-color-nicks") 1106 (autoload 'circe-nick-color-reset "circe-color-nicks")
1143 (add-hook 'modus-themes-after-load-theme-hook 1107 (add-hook 'modus-themes-after-load-theme-hook