Function: gnus-vm-make-folder

gnus-vm-make-folder is a byte-compiled function defined in gnus-vm.el.gz.

Signature

(gnus-vm-make-folder &optional BUFFER)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-vm.el.gz
(defun gnus-vm-make-folder (&optional buffer)
  (require 'vm)
  (let ((article (or buffer (current-buffer)))
	(tmp-folder (generate-new-buffer " *tmp-folder*"))
	(start (point-min))
	(end (point-max)))
    (set-buffer tmp-folder)
    (insert-buffer-substring article start end)
    (goto-char (point-min))
    (if (looking-at "^\\(From [^ ]+ \\).*$")
	(replace-match (concat "\\1" (current-time-string)))
      (insert "From " gnus-newsgroup-name " "
	      (current-time-string) "\n"))
    (while (re-search-forward "\n\nFrom " nil t)
      (replace-match "\n\n>From "))
    ;; insert a newline, otherwise the last line gets lost
    (goto-char (point-max))
    (insert "\n")
    (vm-mode)
    tmp-folder))