726 |
(or (not gnus-uncacheable-groups) |
(or (not gnus-uncacheable-groups) |
727 |
(not (string-match gnus-uncacheable-groups group))))))) |
(not (string-match gnus-uncacheable-groups group))))))) |
728 |
|
|
729 |
|
;;;###autoload |
730 |
|
(defun gnus-cache-rename-group (old-group new-group) |
731 |
|
"Rename OLD-GROUP as NEW-GROUP. Always updates the cache, even when |
732 |
|
disabled, as the old cache files would corrupt gnus when the cache was |
733 |
|
next enabled. Depends upon the caller to determine whether group renaming is supported." |
734 |
|
(let ((old-dir (gnus-cache-file-name old-group "")) |
735 |
|
(new-dir (gnus-cache-file-name new-group ""))) |
736 |
|
(gnus-rename-file old-dir new-dir t)) |
737 |
|
|
738 |
|
(let ((no-save gnus-cache-active-hashtb)) |
739 |
|
(unless gnus-cache-active-hashtb |
740 |
|
(gnus-cache-read-active)) |
741 |
|
(let* ((old-group-hash-value (gnus-gethash old-group gnus-cache-active-hashtb)) |
742 |
|
(new-group-hash-value (gnus-gethash new-group gnus-cache-active-hashtb)) |
743 |
|
(delta (or old-group-hash-value new-group-hash-value))) |
744 |
|
(gnus-sethash new-group old-group-hash-value gnus-cache-active-hashtb) |
745 |
|
(gnus-sethash old-group nil gnus-cache-active-hashtb) |
746 |
|
|
747 |
|
(if no-save |
748 |
|
(setq gnus-cache-active-altered delta) |
749 |
|
(gnus-cache-write-active delta))))) |
750 |
|
|
751 |
|
;;;###autoload |
752 |
|
(defun gnus-cache-delete-group (group) |
753 |
|
"Delete GROUP. Always updates the cache, even when |
754 |
|
disabled, as the old cache files would corrupt gnus when the cache was |
755 |
|
next enabled. Depends upon the caller to determine whether group deletion is supported." |
756 |
|
(let ((dir (gnus-cache-file-name group ""))) |
757 |
|
(gnus-delete-file dir)) |
758 |
|
|
759 |
|
(let ((no-save gnus-cache-active-hashtb)) |
760 |
|
(unless gnus-cache-active-hashtb |
761 |
|
(gnus-cache-read-active)) |
762 |
|
(let* ((group-hash-value (gnus-gethash group gnus-cache-active-hashtb))) |
763 |
|
(gnus-sethash group nil gnus-cache-active-hashtb) |
764 |
|
|
765 |
|
(if no-save |
766 |
|
(setq gnus-cache-active-altered group-hash-value) |
767 |
|
(gnus-cache-write-active group-hash-value))))) |
768 |
|
|
769 |
(provide 'gnus-cache) |
(provide 'gnus-cache) |
770 |
|
|
771 |
;;; arch-tag: 05a79442-8c58-4e65-bd0a-3cbb1b89a33a |
;;; arch-tag: 05a79442-8c58-4e65-bd0a-3cbb1b89a33a |