gnus-setup.el 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. ;;; gnus-setup.el --- Initialization & Setup for Gnus 5
  2. ;; Copyright (C) 1995-1996, 2000-2012 Free Software Foundation, Inc.
  3. ;; Author: Steven L. Baur <steve@miranova.com>
  4. ;; Keywords: news
  5. ;; This file is part of GNU Emacs.
  6. ;; GNU Emacs is free software: you can redistribute it and/or modify
  7. ;; it under the terms of the GNU General Public License as published by
  8. ;; the Free Software Foundation, either version 3 of the License, or
  9. ;; (at your option) any later version.
  10. ;; GNU Emacs is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;; My head is starting to spin with all the different mail/news packages.
  18. ;; Stop The Madness!
  19. ;; Given that Emacs Lisp byte codes may be diverging, it is probably best
  20. ;; not to byte compile this, and just arrange to have the .el loaded out
  21. ;; of .emacs.
  22. ;;; Code:
  23. (eval-when-compile (require 'cl))
  24. (defvar gnus-use-installed-gnus t
  25. "*If non-nil use installed version of Gnus.")
  26. (defvar gnus-use-installed-mailcrypt (featurep 'xemacs)
  27. "*If non-nil use installed version of mailcrypt.")
  28. (defvar gnus-emacs-lisp-directory (if (featurep 'xemacs)
  29. "/usr/local/lib/xemacs/"
  30. "/usr/local/share/emacs/")
  31. "Directory where Emacs site lisp is located.")
  32. (defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory
  33. "gnus/lisp/")
  34. "Directory where Gnus Emacs lisp is found.")
  35. (defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory
  36. "site-lisp/mailcrypt/")
  37. "Directory where Mailcrypt Emacs Lisp is found.")
  38. (defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory
  39. "site-lisp/bbdb/")
  40. "Directory where Big Brother Database is found.")
  41. (defvar gnus-use-mhe nil
  42. "Set this if you want to use MH-E for mail reading.")
  43. (defvar gnus-use-rmail nil
  44. "Set this if you want to use RMAIL for mail reading.")
  45. (defvar gnus-use-sendmail t
  46. "Set this if you want to use SENDMAIL for mail reading.")
  47. (defvar gnus-use-vm nil
  48. "Set this if you want to use the VM package for mail reading.")
  49. (defvar gnus-use-sc nil
  50. "Set this if you want to use Supercite.")
  51. (defvar gnus-use-mailcrypt t
  52. "Set this if you want to use Mailcrypt for dealing with PGP messages.")
  53. (defvar gnus-use-bbdb nil
  54. "Set this if you want to use the Big Brother DataBase.")
  55. (when (and (not gnus-use-installed-gnus)
  56. (null (member gnus-gnus-lisp-directory load-path)))
  57. (push gnus-gnus-lisp-directory load-path))
  58. ;;; We can't do this until we know where Gnus is.
  59. (require 'message)
  60. ;;; Mailcrypt by
  61. ;;; Jin Choi <jin@atype.com>
  62. ;;; Patrick LoPresti <patl@lcs.mit.edu>
  63. (when gnus-use-mailcrypt
  64. (when (and (not gnus-use-installed-mailcrypt)
  65. (null (member gnus-mailcrypt-lisp-directory load-path)))
  66. (setq load-path (cons gnus-mailcrypt-lisp-directory load-path)))
  67. (autoload 'mc-install-write-mode "mailcrypt" nil t)
  68. (autoload 'mc-install-read-mode "mailcrypt" nil t)
  69. ;;; (add-hook 'message-mode-hook 'mc-install-write-mode)
  70. ;;; (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
  71. (when gnus-use-mhe
  72. (add-hook 'mh-folder-mode-hook 'mc-install-read-mode)
  73. (add-hook 'mh-letter-mode-hook 'mc-install-write-mode)))
  74. ;;; BBDB by
  75. ;;; Jamie Zawinski <jwz@lucid.com>
  76. (when gnus-use-bbdb
  77. ;; bbdb will never be installed with emacs.
  78. (when (null (member gnus-bbdb-lisp-directory load-path))
  79. (setq load-path (cons gnus-bbdb-lisp-directory load-path)))
  80. (autoload 'bbdb "bbdb-com"
  81. "Insidious Big Brother Database" t)
  82. (autoload 'bbdb-name "bbdb-com"
  83. "Insidious Big Brother Database" t)
  84. (autoload 'bbdb-company "bbdb-com"
  85. "Insidious Big Brother Database" t)
  86. (autoload 'bbdb-net "bbdb-com"
  87. "Insidious Big Brother Database" t)
  88. (autoload 'bbdb-notes "bbdb-com"
  89. "Insidious Big Brother Database" t)
  90. (when gnus-use-vm
  91. (autoload 'bbdb-insinuate-vm "bbdb-vm"
  92. "Hook BBDB into VM" t))
  93. (when gnus-use-rmail
  94. (autoload 'bbdb-insinuate-rmail "bbdb-rmail"
  95. "Hook BBDB into RMAIL" t)
  96. (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail))
  97. (when gnus-use-mhe
  98. (autoload 'bbdb-insinuate-mh "bbdb-mh"
  99. "Hook BBDB into MH-E" t)
  100. (add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh))
  101. (autoload 'bbdb-insinuate-gnus "bbdb-gnus"
  102. "Hook BBDB into Gnus" t)
  103. (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
  104. (when gnus-use-sendmail
  105. (autoload 'bbdb-insinuate-sendmail "bbdb"
  106. "Insidious Big Brother Database" t)
  107. (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail)
  108. (add-hook 'message-setup-hook 'bbdb-insinuate-sendmail)))
  109. (when gnus-use-sc
  110. (add-hook 'mail-citation-hook 'sc-cite-original)
  111. (setq message-cite-function 'sc-cite-original))
  112. ;;;### (autoloads (gnus gnus-slave gnus-no-server) "gnus" "lisp/gnus.el" (12473 2137))
  113. ;;; Generated autoloads from lisp/gnus.el
  114. ;; Don't redo this if autoloads already exist
  115. (unless (fboundp 'gnus)
  116. (autoload 'gnus-slave-no-server "gnus" "\
  117. Read network news as a slave without connecting to local server." t nil)
  118. (autoload 'gnus-no-server "gnus" "\
  119. Read network news.
  120. If ARG is a positive number, Gnus will use that as the
  121. startup level. If ARG is nil, Gnus will be started at level 2.
  122. If ARG is non-nil and not a positive number, Gnus will
  123. prompt the user for the name of an NNTP server to use.
  124. As opposed to `gnus', this command will not connect to the local server." t nil)
  125. (autoload 'gnus-slave "gnus" "\
  126. Read news as a slave." t nil)
  127. (autoload 'gnus "gnus" "\
  128. Read network news.
  129. If ARG is non-nil and a positive number, Gnus will use that as the
  130. startup level. If ARG is non-nil and not a positive number, Gnus will
  131. prompt the user for the name of an NNTP server to use." t nil)
  132. ;;;***
  133. ;;; These have moved out of gnus.el into other files.
  134. ;;; FIX FIX FIX: should other things be in gnus-setup? or these not in it?
  135. (autoload 'gnus-update-format "gnus-spec" "\
  136. Update the format specification near point." t nil)
  137. (autoload 'gnus-fetch-group "gnus-group" "\
  138. Start Gnus if necessary and enter GROUP.
  139. Returns whether the fetching was successful or not." t nil)
  140. (defalias 'gnus-batch-kill 'gnus-batch-score)
  141. (autoload 'gnus-batch-score "gnus-kill" "\
  142. Run batched scoring.
  143. Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ...
  144. Newsgroups is a list of strings in Bnews format. If you want to score
  145. the comp hierarchy, you'd say \"comp.all\". If you would not like to
  146. score the alt hierarchy, you'd say \"!alt.all\"." t nil))
  147. (provide 'gnus-setup)
  148. (run-hooks 'gnus-setup-load-hook)
  149. ;;; gnus-setup.el ends here