Function: erc-dcc-append-contents

erc-dcc-append-contents is a byte-compiled function defined in erc-dcc.el.gz.

Signature

(erc-dcc-append-contents BUFFER FILE)

Documentation

Append the contents of BUFFER to FILE.

The contents of the BUFFER will then be erased.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-dcc.el.gz
(defun erc-dcc-append-contents (buffer _file)
  "Append the contents of BUFFER to FILE.
The contents of the BUFFER will then be erased."
  (with-current-buffer buffer
    (let ((coding-system-for-write 'binary)
          (inhibit-read-only t)
          (inhibit-file-name-handlers
           (append '(jka-compr-handler image-file-handler)
                   inhibit-file-name-handlers))
          (inhibit-file-name-operation 'write-region))
      (write-region (point-min) (point-max) erc-dcc-file-name t 'nomessage)
      (setq erc-dcc-byte-count (+ (buffer-size) erc-dcc-byte-count))
      (erase-buffer))))