summaryrefslogtreecommitdiff
path: root/lisp/erc
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-13 14:35:30 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-13 14:35:30 +0200
commit390c8805c2c4e636c12c5c7e892c3c5e481a0256 (patch)
tree23db0e0827a1f170b171b4cf22bb51d6c7fa115b /lisp/erc
parentbc7e771f9b1e204efff015464a40c3ee59668fd9 (diff)
downloademacs-390c8805c2c4e636c12c5c7e892c3c5e481a0256.tar.gz
emacs-390c8805c2c4e636c12c5c7e892c3c5e481a0256.tar.bz2
emacs-390c8805c2c4e636c12c5c7e892c3c5e481a0256.zip
Fix erc-dcc server-close code and fix compilation warning
* lisp/erc/erc-dcc.el (erc-dcc-get-filter): We receive unibyte data, so no need to convert to unibyte. (erc-dcc-send-filter): Kill the process before killing the buffer so that we're not queried about killing the process.
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/erc-dcc.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index abc31484f8a..2b6f8c91a63 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -813,8 +813,8 @@ bytes sent."
?s (number-to-string (- sent-marker (point-min))))
(setq erc-dcc-list (delete elt erc-dcc-list))
(set-buffer-modified-p nil)
- (kill-buffer (current-buffer))
- (delete-process proc))
+ (delete-process proc)
+ (kill-buffer (current-buffer)))
((<= confirmed-marker sent-marker)
(while (and (< (- sent-marker confirmed-marker)
(or erc-dcc-pump-bytes
@@ -827,8 +827,8 @@ bytes sent."
(marker-position confirmed-marker)
(marker-position sent-marker)))
(set-buffer-modified-p nil)
- (kill-buffer (current-buffer))
- (delete-process proc))))))
+ (delete-process proc)
+ (kill-buffer (current-buffer)))))))
(defun erc-dcc-display-send (proc)
(erc-display-message
@@ -978,8 +978,9 @@ rather than every 1024 byte block, but nobody seems to care."
(let ((inhibit-read-only t)
received-bytes)
(goto-char (point-max))
- (if str
- (insert (string-make-unibyte str)))
+ (when str
+ (cl-assert (not (multibyte-string-p str)))
+ (insert str))
(when (> (point-max) erc-dcc-receive-cache)
(erc-dcc-append-contents (current-buffer) erc-dcc-file-name))