aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGnus developers2011-04-07 22:48:21 +0000
committerKatsumi Yamaoka2011-04-07 22:48:21 +0000
commit4523dc7f800db03f6bd86c84772dbe5ac39db851 (patch)
tree6190c95472117165ac99b8e6483600dbd5b97a37
parent5f64f7bd363dc97be5e0d198aad52045469faa8d (diff)
downloademacs-4523dc7f800db03f6bd86c84772dbe5ac39db851.tar.gz
emacs-4523dc7f800db03f6bd86c84772dbe5ac39db851.zip
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 @@
12011-04-07 Teodor Zlatanov <tzz@lifelogs.com>
2
3 * gnus-registry.el (gnus-registry-handle-action): More debugging.
4
5 * gnus-start.el (gnus-gnus-to-newsrc-format): Add a way to run
6 interactively so the newsrc file can contain foreign groups too.
7 Useful for debugging but not much for users.
8
92011-04-07 David Engster <dengste@eml.cc>
10
11 * registry.el (registry-usage-test): Only do
12 `registry-lookup-breaks-before-lexbind' testing for Emacs24 with
13 lexical binding.
14
12011-04-06 David Engster <dengste@eml.cc> 152011-04-06 David Engster <dengste@eml.cc>
2 16
3 * registry.el, gnus-registry.el: Use `ignore-errors' instead of third 17 * 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'."
321 (gnus-registry-handle-action id nil to subject sender))) 321 (gnus-registry-handle-action id nil to subject sender)))
322 322
323(defun gnus-registry-handle-action (id from to subject sender) 323(defun gnus-registry-handle-action (id from to subject sender)
324 (gnus-message
325 10
326 "gnus-registry-handle-action %S" (list id from to subject sender))
324 (let ((db gnus-registry-db) 327 (let ((db gnus-registry-db)
325 ;; safe if not found 328 ;; safe if not found
326 (entry (gnus-registry-get-or-make-entry id))) 329 (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."
2873 (pop list)) 2873 (pop list))
2874 (nreverse olist))) 2874 (nreverse olist)))
2875 2875
2876(defun gnus-gnus-to-newsrc-format () 2876(defun gnus-gnus-to-newsrc-format (&optional foreign-ok)
2877 (interactive (list (gnus-y-or-n-p "write foreign groups too? ")))
2877 ;; Generate and save the .newsrc file. 2878 ;; Generate and save the .newsrc file.
2878 (with-current-buffer (create-file-buffer gnus-current-startup-file) 2879 (with-current-buffer (create-file-buffer gnus-current-startup-file)
2879 (let ((newsrc (cdr gnus-newsrc-alist)) 2880 (let ((newsrc (cdr gnus-newsrc-alist))
@@ -2895,7 +2896,8 @@ If FORCE is non-nil, the .newsrc file is read."
2895 ;; Don't write foreign groups to .newsrc. 2896 ;; Don't write foreign groups to .newsrc.
2896 (when (or (null (setq method (gnus-info-method info))) 2897 (when (or (null (setq method (gnus-info-method info)))
2897 (equal method "native") 2898 (equal method "native")
2898 (inline (gnus-server-equal method gnus-select-method))) 2899 (inline (gnus-server-equal method gnus-select-method))
2900 foreign-ok)
2899 (insert (gnus-info-group info) 2901 (insert (gnus-info-group info)
2900 (if (> (gnus-info-level info) gnus-level-subscribed) 2902 (if (> (gnus-info-level info) gnus-level-subscribed)
2901 "!" ":")) 2903 "!" ":"))
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."
357 (should (= 58 (caadr (registry-lookup db '(1 58 99))))) 357 (should (= 58 (caadr (registry-lookup db '(1 58 99)))))
358 (message "Grouped individual lookup") 358 (message "Grouped individual lookup")
359 (should (= 3 (length (registry-lookup db '(1 58 99))))) 359 (should (= 3 (length (registry-lookup db '(1 58 99)))))
360 (message "Individual lookup (breaks before lexbind)") 360 (when (boundp 'lexical-binding)
361 (should (= 58 361 (message "Individual lookup (breaks before lexbind)")
362 (caadr (registry-lookup-breaks-before-lexbind db '(1 58 99))))) 362 (should (= 58
363 (message "Grouped individual lookup (breaks before lexbind)") 363 (caadr (registry-lookup-breaks-before-lexbind db '(1 58 99)))))
364 (should (= 3 364 (message "Grouped individual lookup (breaks before lexbind)")
365 (length (registry-lookup-breaks-before-lexbind db '(1 58 99))))) 365 (should (= 3
366 (length (registry-lookup-breaks-before-lexbind db '(1 58 99))))))
366 (message "Search") 367 (message "Search")
367 (should (= n (length (registry-search db :all t)))) 368 (should (= n (length (registry-search db :all t))))
368 (should (= n (length (registry-search db :member '((sender "me")))))) 369 (should (= n (length (registry-search db :member '((sender "me"))))))