Function: gnus-cache-rename-group
gnus-cache-rename-group is an autoloaded and byte-compiled function
defined in gnus-cache.el.gz.
Signature
(gnus-cache-rename-group OLD-GROUP NEW-GROUP)
Documentation
Rename OLD-GROUP as NEW-GROUP.
Always updates the cache, even when disabled, as the old cache files would corrupt Gnus when the cache was next enabled. It depends on the caller to determine whether group renaming is supported.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-cache.el.gz
;;;###autoload
(defun gnus-cache-rename-group (old-group new-group)
"Rename OLD-GROUP as NEW-GROUP.
Always updates the cache, even when disabled, as the old cache
files would corrupt Gnus when the cache was next enabled. It
depends on the caller to determine whether group renaming is
supported."
(let ((old-dir (gnus-cache-file-name old-group ""))
(new-dir (gnus-cache-file-name new-group ""))
(file-name-coding-system nnmail-pathname-coding-system))
(gnus-rename-file old-dir new-dir t))
(gnus-cache-rename-group-total-fetched-for old-group new-group)
(let ((no-save gnus-cache-active-hashtb))
(unless gnus-cache-active-hashtb
(gnus-cache-read-active))
(let* ((old-group-hash-value
(gethash old-group gnus-cache-active-hashtb))
(new-group-hash-value
(gethash new-group gnus-cache-active-hashtb))
(delta
(or old-group-hash-value new-group-hash-value)))
(puthash new-group old-group-hash-value gnus-cache-active-hashtb)
(puthash old-group nil gnus-cache-active-hashtb)
(if no-save
(setq gnus-cache-active-altered delta)
(gnus-cache-write-active delta)))))