(gnus-write-active-file): Copy from Gnus 5.8.2.
authorkeiichi <keiichi>
Mon, 27 Dec 1999 04:20:48 +0000 (04:20 +0000)
committerkeiichi <keiichi>
Mon, 27 Dec 1999 04:20:48 +0000 (04:20 +0000)
lisp/gnus-util.el

index a13012e..d9d2c32 100644 (file)
@@ -1004,6 +1004,25 @@ ARG is passed to the first function."
          re
          (unless (string-match "\\$$" re) ".*$")))
 
+(defun gnus-write-active-file (file hashtb &optional full-names)
+  (with-temp-file file
+    (mapatoms
+     (lambda (sym)
+       (when (and sym
+                 (boundp sym)
+                 (symbol-value sym))
+        (insert (format "%S %d %d y\n"
+                        (if full-names
+                            sym
+                          (intern (gnus-group-real-name (symbol-name sym))))
+                        (or (cdr (symbol-value sym))
+                            (car (symbol-value sym)))
+                        (car (symbol-value sym))))))
+     hashtb)
+    (goto-char (point-max))
+    (while (search-backward "\\." nil t)
+      (delete-char 1))))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here