diff options
| author | F. Jason Park | 2022-07-24 05:14:24 -0700 |
|---|---|---|
| committer | F. Jason Park | 2022-07-27 05:19:09 -0700 |
| commit | 075d6bb41089a7ea4bb5353dd70448ed5653261c (patch) | |
| tree | fa7cfe4e594c530f425f0143b853c2a7d58ba485 /lisp/erc | |
| parent | 4a5499910a114a5e8a8b41e04397c20dec14935b (diff) | |
| download | emacs-075d6bb41089a7ea4bb5353dd70448ed5653261c.tar.gz emacs-075d6bb41089a7ea4bb5353dd70448ed5653261c.zip | |
Ensure erc-dcc-chat-setup runs in the right buffer
* lisp/erc/erc-dcc.el (erc-dcc-chat-setup): Ensure initialization runs
in the intended buffer regardless of the value of `erc-join-buffer'.
(erc-dcc--send-final-turbo-ack, erc-dcc-get-filter): Rename internal
variable formerly known as `erc-dcc--X-send-final-turbo-ack'.
Diffstat (limited to 'lisp/erc')
| -rw-r--r-- | lisp/erc/erc-dcc.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index d0e1848e0eb..5862fba3b81 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el | |||
| @@ -987,7 +987,7 @@ The contents of the BUFFER will then be erased." | |||
| 987 | 987 | ||
| 988 | ;; If people really need this, we can convert it into a proper option. | 988 | ;; If people really need this, we can convert it into a proper option. |
| 989 | 989 | ||
| 990 | (defvar erc-dcc--X-send-final-turbo-ack nil | 990 | (defvar erc-dcc--send-final-turbo-ack nil |
| 991 | "Workaround for maverick turbo senders that only require a final ACK. | 991 | "Workaround for maverick turbo senders that only require a final ACK. |
| 992 | The only known culprit is WeeChat, with its xfer.network.fast_send | 992 | The only known culprit is WeeChat, with its xfer.network.fast_send |
| 993 | option, which is on by default. Leaving this set to nil and calling | 993 | option, which is on by default. Leaving this set to nil and calling |
| @@ -1032,7 +1032,7 @@ rather than every 1024 byte block, but nobody seems to care." | |||
| 1032 | ;; Some senders want us to hang up. Only observed w. TSEND. | 1032 | ;; Some senders want us to hang up. Only observed w. TSEND. |
| 1033 | ((and (plist-get erc-dcc-entry-data :turbo) | 1033 | ((and (plist-get erc-dcc-entry-data :turbo) |
| 1034 | (= received-bytes (plist-get erc-dcc-entry-data :size))) | 1034 | (= received-bytes (plist-get erc-dcc-entry-data :size))) |
| 1035 | (when erc-dcc--X-send-final-turbo-ack | 1035 | (when erc-dcc--send-final-turbo-ack |
| 1036 | (process-send-string proc (erc-pack-int received-bytes))) | 1036 | (process-send-string proc (erc-pack-int received-bytes))) |
| 1037 | (delete-process proc)) | 1037 | (delete-process proc)) |
| 1038 | ((not (or (plist-get erc-dcc-entry-data :turbo) | 1038 | ((not (or (plist-get erc-dcc-entry-data :turbo) |
| @@ -1182,18 +1182,18 @@ other client." | |||
| 1182 | (proc (plist-get entry :peer)) | 1182 | (proc (plist-get entry :peer)) |
| 1183 | (parent-proc (plist-get entry :parent))) | 1183 | (parent-proc (plist-get entry :parent))) |
| 1184 | (erc-setup-buffer buffer) | 1184 | (erc-setup-buffer buffer) |
| 1185 | ;; buffer is now the current buffer. | 1185 | (with-current-buffer buffer |
| 1186 | (erc-dcc-chat-mode) | 1186 | (erc-dcc-chat-mode) |
| 1187 | (setq erc-server-process parent-proc) | 1187 | (setq erc-server-process parent-proc |
| 1188 | (setq erc-dcc-from nick) | 1188 | erc-dcc-from nick |
| 1189 | (setq erc-dcc-entry-data entry) | 1189 | erc-dcc-entry-data entry |
| 1190 | (setq erc-dcc-unprocessed-output "") | 1190 | erc-dcc-unprocessed-output "" |
| 1191 | (setq erc-insert-marker (point-max-marker)) | 1191 | erc-insert-marker (point-max-marker) |
| 1192 | (setq erc-input-marker (make-marker)) | 1192 | erc-input-marker (make-marker)) |
| 1193 | (erc-display-prompt buffer (point-max)) | 1193 | (erc-display-prompt buffer (point-max)) |
| 1194 | (set-process-buffer proc buffer) | 1194 | (set-process-buffer proc buffer) |
| 1195 | (add-hook 'kill-buffer-hook #'erc-dcc-chat-buffer-killed nil t) | 1195 | (add-hook 'kill-buffer-hook #'erc-dcc-chat-buffer-killed nil t) |
| 1196 | (run-hook-with-args 'erc-dcc-chat-connect-hook proc) | 1196 | (run-hook-with-args 'erc-dcc-chat-connect-hook proc)) |
| 1197 | buffer)) | 1197 | buffer)) |
| 1198 | 1198 | ||
| 1199 | (defun erc-dcc-chat-accept (entry parent-proc) | 1199 | (defun erc-dcc-chat-accept (entry parent-proc) |