Mercurial > emacs
comparison lisp/gnus/nnir.el @ 111963:44431106d60d
nnir.el (nnir-mode): Don't install registry hooks if user hasn't installed the registry.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 14 Dec 2010 12:52:30 +0000 |
parents | 9d703d5d5634 |
children | faa4a1c986c6 |
comparison
equal
deleted
inserted
replaced
111962:d53efc3630ba | 111963:44431106d60d |
---|---|
287 | 287 |
288 (eval-when-compile | 288 (eval-when-compile |
289 (autoload 'nnimap-buffer "nnimap") | 289 (autoload 'nnimap-buffer "nnimap") |
290 (autoload 'nnimap-command "nnimap") | 290 (autoload 'nnimap-command "nnimap") |
291 (autoload 'nnimap-possibly-change-group "nnimap") | 291 (autoload 'nnimap-possibly-change-group "nnimap") |
292 (autoload 'gnus-registry-action "gnus-registry")) | 292 (autoload 'gnus-registry-action "gnus-registry") |
293 (defvar gnus-registry-install)) | |
294 | |
293 | 295 |
294 (nnoo-declare nnir) | 296 (nnoo-declare nnir) |
295 (nnoo-define-basics nnir) | 297 (nnoo-define-basics nnir) |
296 | 298 |
297 (gnus-declare-backend "nnir" 'mail) | 299 (gnus-declare-backend "nnir" 'mail) |
1579 | 1581 |
1580 (defun nnir-mode () | 1582 (defun nnir-mode () |
1581 (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) | 1583 (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) |
1582 (setq gnus-summary-line-format | 1584 (setq gnus-summary-line-format |
1583 (or nnir-summary-line-format gnus-summary-line-format)) | 1585 (or nnir-summary-line-format gnus-summary-line-format)) |
1584 (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) | 1586 (when (eq gnus-registry-install t) |
1585 (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) | 1587 (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) |
1586 (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) | 1588 (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) |
1587 (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) | 1589 (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) |
1588 (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t) | 1590 (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) |
1589 (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t))) | 1591 (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t) |
1592 (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t)))) | |
1590 | 1593 |
1591 | 1594 |
1592 | 1595 |
1593 ;; The end. | 1596 ;; The end. |
1594 (provide 'nnir) | 1597 (provide 'nnir) |