Add debugging option to `gnus-gnus-to-newsrc-format'.
authorTed Zlatanov <tzz@lifelogs.com>
Thu, 7 Apr 2011 21:48:36 +0000 (16:48 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Thu, 7 Apr 2011 21:48:36 +0000 (16:48 -0500)
* gnus-start.el (gnus-gnus-to-newsrc-format): Add a way to run
interactively so the newsrc file can contain foreign groups too.
Useful for debugging but not much for users.

lisp/ChangeLog
lisp/gnus-start.el

index ff1b3b7..a80608a 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-07  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-start.el (gnus-gnus-to-newsrc-format): Add a way to run
+       interactively so the newsrc file can contain foreign groups too.
+       Useful for debugging but not much for users.
+
 2011-04-07  David Engster  <dengste@eml.cc>
 
        * registry.el (registry-usage-test): Only do
index fa582c5..d9d218c 100644 (file)
@@ -2873,7 +2873,8 @@ If FORCE is non-nil, the .newsrc file is read."
       (pop list))
     (nreverse olist)))
 
-(defun gnus-gnus-to-newsrc-format ()
+(defun gnus-gnus-to-newsrc-format (&optional foreign-ok)
+  (interactive (list (gnus-y-or-n-p "write foreign groups too? ")))
   ;; Generate and save the .newsrc file.
   (with-current-buffer (create-file-buffer gnus-current-startup-file)
     (let ((newsrc (cdr gnus-newsrc-alist))
@@ -2895,7 +2896,8 @@ If FORCE is non-nil, the .newsrc file is read."
        ;; Don't write foreign groups to .newsrc.
        (when (or (null (setq method (gnus-info-method info)))
                  (equal method "native")
-                 (inline (gnus-server-equal method gnus-select-method)))
+                 (inline (gnus-server-equal method gnus-select-method))
+                  foreign-ok)
          (insert (gnus-info-group info)
                  (if (> (gnus-info-level info) gnus-level-subscribed)
                      "!" ":"))