summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGnus developers <ding@gnus.org>2011-04-07 22:48:21 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-04-07 22:48:21 +0000
commit4523dc7f800db03f6bd86c84772dbe5ac39db851 (patch)
tree6190c95472117165ac99b8e6483600dbd5b97a37
parent5f64f7bd363dc97be5e0d198aad52045469faa8d (diff)
downloademacs-4523dc7f800db03f6bd86c84772dbe5ac39db851.tar.gz
gnus-registry.el (gnus-registry-handle-action): More debugging.
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. registry.el (registry-usage-test): Only do `registry-lookup-breaks-before-lexbind' testing for Emacs24 with lexical binding.
-rw-r--r--lisp/gnus/ChangeLog14
-rw-r--r--lisp/gnus/gnus-registry.el3
-rw-r--r--lisp/gnus/gnus-start.el6
-rw-r--r--lisp/gnus/registry.el13
4 files changed, 28 insertions, 8 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index f6ce9f089ef..ff8ed828d87 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,17 @@
+2011-04-07 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-registry.el (gnus-registry-handle-action): More debugging.
+
+ * 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
+ `registry-lookup-breaks-before-lexbind' testing for Emacs24 with
+ lexical binding.
+
2011-04-06 David Engster <dengste@eml.cc>
* registry.el, gnus-registry.el: Use `ignore-errors' instead of third
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 5145f01d635..9824fc26f16 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -321,6 +321,9 @@ This is not required after changing `gnus-registry-cache-file'."
(gnus-registry-handle-action id nil to subject sender)))
(defun gnus-registry-handle-action (id from to subject sender)
+ (gnus-message
+ 10
+ "gnus-registry-handle-action %S" (list id from to subject sender))
(let ((db gnus-registry-db)
;; safe if not found
(entry (gnus-registry-get-or-make-entry id)))
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index fa582c58aee..d9d218c6cba 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -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)
"!" ":"))
diff --git a/lisp/gnus/registry.el b/lisp/gnus/registry.el
index 8fb7aab82fb..3c402cb361a 100644
--- a/lisp/gnus/registry.el
+++ b/lisp/gnus/registry.el
@@ -357,12 +357,13 @@ Removes only entries without the :precious keys."
(should (= 58 (caadr (registry-lookup db '(1 58 99)))))
(message "Grouped individual lookup")
(should (= 3 (length (registry-lookup db '(1 58 99)))))
- (message "Individual lookup (breaks before lexbind)")
- (should (= 58
- (caadr (registry-lookup-breaks-before-lexbind db '(1 58 99)))))
- (message "Grouped individual lookup (breaks before lexbind)")
- (should (= 3
- (length (registry-lookup-breaks-before-lexbind db '(1 58 99)))))
+ (when (boundp 'lexical-binding)
+ (message "Individual lookup (breaks before lexbind)")
+ (should (= 58
+ (caadr (registry-lookup-breaks-before-lexbind db '(1 58 99)))))
+ (message "Grouped individual lookup (breaks before lexbind)")
+ (should (= 3
+ (length (registry-lookup-breaks-before-lexbind db '(1 58 99))))))
(message "Search")
(should (= n (length (registry-search db :all t))))
(should (= n (length (registry-search db :member '((sender "me"))))))