]> git.eshelyaron.com Git - emacs.git/commitdiff
nnir.el (nnir-mode): Don't install registry hooks if user hasn't installed the registry.
authorAndrew Cohen <cohen@andy.bu.edu>
Tue, 14 Dec 2010 12:52:30 +0000 (12:52 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 14 Dec 2010 12:52:30 +0000 (12:52 +0000)
lisp/gnus/ChangeLog
lisp/gnus/nnir.el

index 52ef531e3a8adbbe4d94a0706f8ca75cf2575fd6..e7f084ba51868c7c6ad3ed2ebe9c7e6eb9a71d01 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-14  Andrew Cohen  <cohen@andy.bu.edu>
+
+       * nnir.el (nnir-mode): Don't install registry hooks if user hasn't
+       installed the registry.
+
 2010-12-13  Andrew Cohen  <cohen@andy.bu.edu>
 
        * nnir.el (nnir-run-gmane): Better check for gmane groups: error out if
index 6c97f7279fc651561652c4ede3d32526b639c828..0f07bb14062f4de5689dafe19a915b82c9062c2b 100644 (file)
@@ -289,7 +289,9 @@ is `(valuefunc member)'."
   (autoload 'nnimap-buffer "nnimap")
   (autoload 'nnimap-command "nnimap")
   (autoload 'nnimap-possibly-change-group "nnimap")
-  (autoload 'gnus-registry-action "gnus-registry"))
+  (autoload 'gnus-registry-action "gnus-registry")
+  (defvar gnus-registry-install))
+
 
 (nnoo-declare nnir)
 (nnoo-define-basics nnir)
@@ -1581,12 +1583,13 @@ server is of form 'backend:name'."
   (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
     (setq gnus-summary-line-format
          (or nnir-summary-line-format gnus-summary-line-format))
-    (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
-    (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
-    (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)
-    (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t)
-    (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t)
-    (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t)))
+    (when (eq gnus-registry-install t)
+      (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
+      (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
+      (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)
+      (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t)
+      (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t)
+      (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t))))