diff options
| author | Glenn Morris | 2010-03-18 19:55:37 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-03-18 19:55:37 -0700 |
| commit | aa8f82773ff92abcb18aaef29359d8207c09ddcf (patch) | |
| tree | b7ac3867f6bdab08dd05527c801b261eab0ca327 | |
| parent | f70b938acafe7fa3bdd69d77a03b494c5074f88a (diff) | |
| download | emacs-aa8f82773ff92abcb18aaef29359d8207c09ddcf.tar.gz emacs-aa8f82773ff92abcb18aaef29359d8207c09ddcf.zip | |
Stop message.el from loading about 40 libraries it doesn't always need.
The general approach is to autoload rather than require, and to
require in the specific functions rather than the file. (Bug#5642)
* url/url.el: Move mailcap require earlier in the file.
* gnus/gmm-utils.el: Don't require wid-edit.
(widget-create-child-value, widget-convert, widget-default-get):
Autoload.
* gnus/gnus-util.el: Don't require time-date, netrc.
(message-fetch-field, gnus-group-name-decode): Declare rather than
autoloading.
(gnus-fetch-field): Require message.
(gnus-decode-newsgroups): Require gnus-group.
* gnus/ietf-drums.el: Don't require time-date.
* gnus/message.el: Don't require hashcash, canlock, ecomplete.
Do require mail-utils. Require nnheader only when compiling.
(smtpmail-default-smtp-server): Remove declaration.
(message-send-mail-function): Check smtpmail-default-smtp-server
is bound rather than requiring smtpmail.
(message-auto-save-directory, message-insert-signature): Use
expand-file-name rather than nnheader-concat.
(nnheader-insert-file-contents): Autoload.
(hashcash-wait-async): Declare.
(message-send-mail): Only call gnus-setup-posting-charset if
gnus-group-posting-charset-alist is bound. Require hashcash if needed.
(message-send-mail-with-sendmail): Require sendmail.
(canlock-password, canlock-password-for-verify): Declare.
(message-canlock-password): Require canlock.
(nnheader-get-report): Autoload.
(gnus-setup-posting-charset): Declare.
(message-send-news): Require gnus-msg.
(message-make-references, message-make-in-reply-to): Use mail-header-id
rather than the alias mail-header-message-id.
(ecomplete-add-item, ecomplete-save): Declare.
(message-put-addresses-in-ecomplete): Require ecomplete.
(ecomplete-display-matches): Autoload.
* gnus/mm-decode.el: Don't require mailcap, gnus-util.
(gnus-map-function, gnus-replace-in-string, gnus-read-shell-command)
(message-fetch-field, mailcap-parse-mailcaps, mailcap-mime-info):
Autoload.
(mailcap-mime-extensions): Declare.
* gnus/mm-encode.el: Don't require mailcap.
(mailcap-extension-to-mime): Autoload.
* gnus/mml-sec.el: Don't require password-cache.
* gnus/mml.el (gnus-setup-posting-charset): Declare rather than autoload.
(mailcap-parse-mimetypes, mailcap-mime-types): Declare.
(mml-minibuffer-read-type): Require mailcap.
(mml-preview): Require gnus-msg.
* gnus/mml1991.el: Require password-cache.
(password-cache-expiry): Remove declaration.
* gnus/mml2015.el: Require password-cache.
(password-cache-expiry): Remove declaration.
* gnus/nneething.el (mailcap): Require mailcap.
* gnus/nnheader.el: (declare-function): Add compatibility stub.
(message-remove-header): Declare rather than autoload.
(nnheader-replace-header): Require message.
* gnus/nnimap.el (declare-function): Add compatibility stub.
(netrc-parse, netrc-machine-user-or-password): Declare.
(nnimap-open-connection): Require netrc.
* gnus/nntp.el (declare-function): Add compatibility stub.
(netrc-parse, netrc-machine, netrc-get): Declare.
(nntp-send-authinfo): Require netrc.
* gnus/rfc2047.el: Don't require qp.
(quoted-printable-encode-region, quoted-printable-decode-string):
Autoload.
* gnus/sieve-mode.el: Don't require easymenu.
(easy-menu-add-item): Autoload it.
* gnus/spam-stat.el (time-to-number-of-days): Autoload it.
* password-cache.el (password-cache, password-cache-expiry):
Autoload.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 86 | ||||
| -rw-r--r-- | lisp/gnus/gmm-utils.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 10 | ||||
| -rw-r--r-- | lisp/gnus/ietf-drums.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 59 | ||||
| -rw-r--r-- | lisp/gnus/mm-decode.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/mm-encode.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/mml-sec.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/mml.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/mml1991.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/mml2015.el | 8 | ||||
| -rw-r--r-- | lisp/gnus/nneething.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/nnheader.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 11 | ||||
| -rw-r--r-- | lisp/gnus/nntp.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/rfc2047.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/sieve-mode.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/spam-stat.el | 5 | ||||
| -rw-r--r-- | lisp/password-cache.el | 8 | ||||
| -rw-r--r-- | lisp/url/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/url/url.el | 7 |
22 files changed, 224 insertions, 49 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6f2f2e5105..4cdff3848be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-03-19 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * password-cache.el (password-cache, password-cache-expiry): | ||
| 4 | Autoload. | ||
| 5 | |||
| 1 | 2010-03-18 Glenn Morris <rgm@gnu.org> | 6 | 2010-03-18 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/autoload.el (autoload-rubric): Doc fix. | 8 | * emacs-lisp/autoload.el (autoload-rubric): Doc fix. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index f71c7a4300b..8a3aee285d1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,89 @@ | |||
| 1 | 2010-03-19 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | Stop message.el from loading about 40 libraries it doesn't always need. | ||
| 4 | The general approach is to autoload rather than require, and to | ||
| 5 | require in the specific functions rather than the file. (Bug#5642) | ||
| 6 | |||
| 7 | * gmm-utils.el: Don't require wid-edit. | ||
| 8 | (widget-create-child-value, widget-convert, widget-default-get): | ||
| 9 | Autoload. | ||
| 10 | |||
| 11 | * gnus-util.el: Don't require time-date, netrc. | ||
| 12 | (message-fetch-field, gnus-group-name-decode): Declare rather than | ||
| 13 | autoloading. | ||
| 14 | (gnus-fetch-field): Require message. | ||
| 15 | (gnus-decode-newsgroups): Require gnus-group. | ||
| 16 | |||
| 17 | * ietf-drums.el: Don't require time-date. | ||
| 18 | |||
| 19 | * message.el: Don't require hashcash, canlock, ecomplete. | ||
| 20 | Do require mail-utils. Require nnheader only when compiling. | ||
| 21 | (smtpmail-default-smtp-server): Remove declaration. | ||
| 22 | (message-send-mail-function): Check smtpmail-default-smtp-server | ||
| 23 | is bound rather than requiring smtpmail. | ||
| 24 | (message-auto-save-directory, message-insert-signature): Use | ||
| 25 | expand-file-name rather than nnheader-concat. | ||
| 26 | (nnheader-insert-file-contents): Autoload. | ||
| 27 | (hashcash-wait-async): Declare. | ||
| 28 | (message-send-mail): Only call gnus-setup-posting-charset if | ||
| 29 | gnus-group-posting-charset-alist is bound. Require hashcash if needed. | ||
| 30 | (message-send-mail-with-sendmail): Require sendmail. | ||
| 31 | (canlock-password, canlock-password-for-verify): Declare. | ||
| 32 | (message-canlock-password): Require canlock. | ||
| 33 | (nnheader-get-report): Autoload. | ||
| 34 | (gnus-setup-posting-charset): Declare. | ||
| 35 | (message-send-news): Require gnus-msg. | ||
| 36 | (message-make-references, message-make-in-reply-to): Use mail-header-id | ||
| 37 | rather than the alias mail-header-message-id. | ||
| 38 | (ecomplete-add-item, ecomplete-save): Declare. | ||
| 39 | (message-put-addresses-in-ecomplete): Require ecomplete. | ||
| 40 | (ecomplete-display-matches): Autoload. | ||
| 41 | |||
| 42 | * mm-decode.el: Don't require mailcap, gnus-util. | ||
| 43 | (gnus-map-function, gnus-replace-in-string, gnus-read-shell-command) | ||
| 44 | (message-fetch-field, mailcap-parse-mailcaps, mailcap-mime-info): | ||
| 45 | Autoload. | ||
| 46 | (mailcap-mime-extensions): Declare. | ||
| 47 | |||
| 48 | * mm-encode.el: Don't require mailcap. | ||
| 49 | (mailcap-extension-to-mime): Autoload. | ||
| 50 | |||
| 51 | * mml-sec.el: Don't require password-cache. | ||
| 52 | |||
| 53 | * mml.el (gnus-setup-posting-charset): Declare rather than autoload. | ||
| 54 | (mailcap-parse-mimetypes, mailcap-mime-types): Declare. | ||
| 55 | (mml-minibuffer-read-type): Require mailcap. | ||
| 56 | (mml-preview): Require gnus-msg. | ||
| 57 | |||
| 58 | * mml1991.el: Require password-cache. | ||
| 59 | (password-cache-expiry): Remove declaration. | ||
| 60 | |||
| 61 | * mml2015.el: Require password-cache. | ||
| 62 | (password-cache-expiry): Remove declaration. | ||
| 63 | |||
| 64 | * nneething.el (mailcap): Require mailcap. | ||
| 65 | |||
| 66 | * nnheader.el: (declare-function): Add compatibility stub. | ||
| 67 | (message-remove-header): Declare rather than autoload. | ||
| 68 | (nnheader-replace-header): Require message. | ||
| 69 | |||
| 70 | * nnimap.el (declare-function): Add compatibility stub. | ||
| 71 | (netrc-parse, netrc-machine-user-or-password): Declare. | ||
| 72 | (nnimap-open-connection): Require netrc. | ||
| 73 | |||
| 74 | * nntp.el (declare-function): Add compatibility stub. | ||
| 75 | (netrc-parse, netrc-machine, netrc-get): Declare. | ||
| 76 | (nntp-send-authinfo): Require netrc. | ||
| 77 | |||
| 78 | * rfc2047.el: Don't require qp. | ||
| 79 | (quoted-printable-encode-region, quoted-printable-decode-string): | ||
| 80 | Autoload. | ||
| 81 | |||
| 82 | * sieve-mode.el: Don't require easymenu. | ||
| 83 | (easy-menu-add-item): Autoload it. | ||
| 84 | |||
| 85 | * spam-stat.el (time-to-number-of-days): Autoload it. | ||
| 86 | |||
| 1 | 2010-03-17 Kevin Ryde <user42@zip.com.au> | 87 | 2010-03-17 Kevin Ryde <user42@zip.com.au> |
| 2 | 88 | ||
| 3 | * mml.el (mml-read-tag): Unquote values with `read' to reverse | 89 | * mml.el (mml-read-tag): Unquote values with `read' to reverse |
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index b44d3c08c4a..640eb50a022 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el | |||
| @@ -28,8 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (require 'wid-edit) | ||
| 32 | |||
| 33 | (defgroup gmm nil | 31 | (defgroup gmm nil |
| 34 | "Utility functions for Gnus, Message and MML." | 32 | "Utility functions for Gnus, Message and MML." |
| 35 | :prefix "gmm-" | 33 | :prefix "gmm-" |
| @@ -95,6 +93,10 @@ ARGS are passed to `message'." | |||
| 95 | "Non-nil if SYMBOL is a widget." | 93 | "Non-nil if SYMBOL is a widget." |
| 96 | (get symbol 'widget-type)) | 94 | (get symbol 'widget-type)) |
| 97 | 95 | ||
| 96 | (autoload 'widget-create-child-value "wid-edit") | ||
| 97 | (autoload 'widget-convert "wid-edit") | ||
| 98 | (autoload 'widget-default-get "wid-edit") | ||
| 99 | |||
| 98 | ;; Copy of the `nnmail-lazy' code from `nnmail.el': | 100 | ;; Copy of the `nnmail-lazy' code from `nnmail.el': |
| 99 | (define-widget 'gmm-lazy 'default | 101 | (define-widget 'gmm-lazy 'default |
| 100 | "Base widget for recursive datastructures. | 102 | "Base widget for recursive datastructures. |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index d101047280c..f011cda31a4 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -53,10 +53,6 @@ | |||
| 53 | (defvar gnus-original-article-buffer) | 53 | (defvar gnus-original-article-buffer) |
| 54 | (defvar gnus-user-agent) | 54 | (defvar gnus-user-agent) |
| 55 | 55 | ||
| 56 | (require 'time-date) | ||
| 57 | (require 'netrc) | ||
| 58 | |||
| 59 | (autoload 'message-fetch-field "message") | ||
| 60 | (autoload 'gnus-get-buffer-window "gnus-win") | 56 | (autoload 'gnus-get-buffer-window "gnus-win") |
| 61 | (autoload 'nnheader-narrow-to-headers "nnheader") | 57 | (autoload 'nnheader-narrow-to-headers "nnheader") |
| 62 | (autoload 'nnheader-replace-chars-in-string "nnheader") | 58 | (autoload 'nnheader-replace-chars-in-string "nnheader") |
| @@ -206,8 +202,11 @@ Uses `gnus-extract-address-components'." | |||
| 206 | Uses `gnus-extract-address-components'." | 202 | Uses `gnus-extract-address-components'." |
| 207 | (nth 1 (gnus-extract-address-components from))) | 203 | (nth 1 (gnus-extract-address-components from))) |
| 208 | 204 | ||
| 205 | (declare-function message-fetch-field "message" (header &optional not-all)) | ||
| 206 | |||
| 209 | (defun gnus-fetch-field (field) | 207 | (defun gnus-fetch-field (field) |
| 210 | "Return the value of the header FIELD of current article." | 208 | "Return the value of the header FIELD of current article." |
| 209 | (require 'message) | ||
| 211 | (save-excursion | 210 | (save-excursion |
| 212 | (save-restriction | 211 | (save-restriction |
| 213 | (let ((inhibit-point-motion-hooks t)) | 212 | (let ((inhibit-point-motion-hooks t)) |
| @@ -228,13 +227,14 @@ Uses `gnus-extract-address-components'." | |||
| 228 | (point))))) | 227 | (point))))) |
| 229 | 228 | ||
| 230 | (declare-function gnus-find-method-for-group "gnus" (group &optional info)) | 229 | (declare-function gnus-find-method-for-group "gnus" (group &optional info)) |
| 231 | (autoload 'gnus-group-name-decode "gnus-group") | 230 | (declare-function gnus-group-name-decode "gnus-group" (string charset)) |
| 232 | (declare-function gnus-group-name-charset "gnus-group" (method group)) | 231 | (declare-function gnus-group-name-charset "gnus-group" (method group)) |
| 233 | ;; gnus-group requires gnus-int which requires message. | 232 | ;; gnus-group requires gnus-int which requires message. |
| 234 | (declare-function message-tokenize-header "message" | 233 | (declare-function message-tokenize-header "message" |
| 235 | (header &optional separator)) | 234 | (header &optional separator)) |
| 236 | 235 | ||
| 237 | (defun gnus-decode-newsgroups (newsgroups group &optional method) | 236 | (defun gnus-decode-newsgroups (newsgroups group &optional method) |
| 237 | (require 'gnus-group) | ||
| 238 | (let ((method (or method (gnus-find-method-for-group group)))) | 238 | (let ((method (or method (gnus-find-method-for-group group)))) |
| 239 | (mapconcat (lambda (group) | 239 | (mapconcat (lambda (group) |
| 240 | (gnus-group-name-decode group (gnus-group-name-charset | 240 | (gnus-group-name-decode group (gnus-group-name-charset |
diff --git a/lisp/gnus/ietf-drums.el b/lisp/gnus/ietf-drums.el index 87012405ef9..ffcb6fa60e0 100644 --- a/lisp/gnus/ietf-drums.el +++ b/lisp/gnus/ietf-drums.el | |||
| @@ -39,7 +39,6 @@ | |||
| 39 | ;;; Code: | 39 | ;;; Code: |
| 40 | 40 | ||
| 41 | (eval-when-compile (require 'cl)) | 41 | (eval-when-compile (require 'cl)) |
| 42 | (require 'time-date) | ||
| 43 | (require 'mm-util) | 42 | (require 'mm-util) |
| 44 | 43 | ||
| 45 | (defvar ietf-drums-no-ws-ctl-token "\001-\010\013\014\016-\037\177" | 44 | (defvar ietf-drums-no-ws-ctl-token "\001-\010\013\014\016-\037\177" |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index d255e3410bd..abdc163bb16 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -34,11 +34,12 @@ | |||
| 34 | (eval-when-compile | 34 | (eval-when-compile |
| 35 | (require 'cl)) | 35 | (require 'cl)) |
| 36 | 36 | ||
| 37 | (require 'hashcash) | ||
| 38 | (require 'canlock) | ||
| 39 | (require 'mailheader) | 37 | (require 'mailheader) |
| 40 | (require 'gmm-utils) | 38 | (require 'gmm-utils) |
| 41 | (require 'nnheader) | 39 | (require 'mail-utils) |
| 40 | ;; Only for the trivial macros mail-header-from, mail-header-date | ||
| 41 | ;; mail-header-references, mail-header-subject, mail-header-id | ||
| 42 | (eval-when-compile (require 'nnheader)) | ||
| 42 | ;; This is apparently necessary even though things are autoloaded. | 43 | ;; This is apparently necessary even though things are autoloaded. |
| 43 | ;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better | 44 | ;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better |
| 44 | ;; require mailabbrev here. | 45 | ;; require mailabbrev here. |
| @@ -48,7 +49,6 @@ | |||
| 48 | (require 'mail-parse) | 49 | (require 'mail-parse) |
| 49 | (require 'mml) | 50 | (require 'mml) |
| 50 | (require 'rfc822) | 51 | (require 'rfc822) |
| 51 | (require 'ecomplete) | ||
| 52 | 52 | ||
| 53 | (autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/ | 53 | (autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/ |
| 54 | 54 | ||
| @@ -655,8 +655,6 @@ Done before generating the new subject of a forward." | |||
| 655 | :link '(custom-manual "(message)Canceling News") | 655 | :link '(custom-manual "(message)Canceling News") |
| 656 | :type 'string) | 656 | :type 'string) |
| 657 | 657 | ||
| 658 | (defvar smtpmail-default-smtp-server) | ||
| 659 | |||
| 660 | (defun message-send-mail-function () | 658 | (defun message-send-mail-function () |
| 661 | "Return suitable value for the variable `message-send-mail-function'." | 659 | "Return suitable value for the variable `message-send-mail-function'." |
| 662 | (cond ((and (require 'sendmail) | 660 | (cond ((and (require 'sendmail) |
| @@ -665,14 +663,13 @@ Done before generating the new subject of a forward." | |||
| 665 | (executable-find sendmail-program)) | 663 | (executable-find sendmail-program)) |
| 666 | 'message-send-mail-with-sendmail) | 664 | 'message-send-mail-with-sendmail) |
| 667 | ((and (locate-library "smtpmail") | 665 | ((and (locate-library "smtpmail") |
| 668 | (require 'smtpmail) | 666 | (boundp 'smtpmail-default-smtp-server) |
| 669 | smtpmail-default-smtp-server) | 667 | smtpmail-default-smtp-server) |
| 670 | 'message-smtpmail-send-it) | 668 | 'message-smtpmail-send-it) |
| 671 | ((locate-library "mailclient") | 669 | ((locate-library "mailclient") |
| 672 | 'message-send-mail-with-mailclient) | 670 | 'message-send-mail-with-mailclient) |
| 673 | (t | 671 | (t |
| 674 | (lambda () | 672 | (error "Don't know how to send mail. Please customize `message-send-mail-function'")))) |
| 675 | (error "Don't know how to send mail. Please customize `message-send-mail-function'"))))) | ||
| 676 | 673 | ||
| 677 | ;; Useful to set in site-init.el | 674 | ;; Useful to set in site-init.el |
| 678 | (defcustom message-send-mail-function | 675 | (defcustom message-send-mail-function |
| @@ -1282,7 +1279,7 @@ text and it replaces `self-insert-command' with the other command, e.g. | |||
| 1282 | :type '(repeat function)) | 1279 | :type '(repeat function)) |
| 1283 | 1280 | ||
| 1284 | (defcustom message-auto-save-directory | 1281 | (defcustom message-auto-save-directory |
| 1285 | (file-name-as-directory (nnheader-concat message-directory "drafts")) | 1282 | (file-name-as-directory (expand-file-name "drafts" message-directory)) |
| 1286 | "*Directory where Message auto-saves buffers if Gnus isn't running. | 1283 | "*Directory where Message auto-saves buffers if Gnus isn't running. |
| 1287 | If nil, Message won't auto-save." | 1284 | If nil, Message won't auto-save." |
| 1288 | :group 'message-buffers | 1285 | :group 'message-buffers |
| @@ -1958,6 +1955,8 @@ is used by default." | |||
| 1958 | (setq paren nil)))) | 1955 | (setq paren nil)))) |
| 1959 | (nreverse elems))))) | 1956 | (nreverse elems))))) |
| 1960 | 1957 | ||
| 1958 | (autoload 'nnheader-insert-file-contents "nnheader") | ||
| 1959 | |||
| 1961 | (defun message-mail-file-mbox-p (file) | 1960 | (defun message-mail-file-mbox-p (file) |
| 1962 | "Say whether FILE looks like a Unix mbox file." | 1961 | "Say whether FILE looks like a Unix mbox file." |
| 1963 | (when (and (file-exists-p file) | 1962 | (when (and (file-exists-p file) |
| @@ -3410,8 +3409,8 @@ Message buffers and is not meant to be called directly." | |||
| 3410 | ;; if message-signature-file contains a path. | 3409 | ;; if message-signature-file contains a path. |
| 3411 | (not (file-name-directory | 3410 | (not (file-name-directory |
| 3412 | message-signature-file))) | 3411 | message-signature-file))) |
| 3413 | (nnheader-concat message-signature-directory | 3412 | (expand-file-name message-signature-file |
| 3414 | message-signature-file) | 3413 | message-signature-directory) |
| 3415 | message-signature-file)) | 3414 | message-signature-file)) |
| 3416 | (file-exists-p signature-file)))) | 3415 | (file-exists-p signature-file)))) |
| 3417 | (when signature | 3416 | (when signature |
| @@ -4414,6 +4413,8 @@ This function could be useful in `message-setup-hook'." | |||
| 4414 | (erase-buffer))) | 4413 | (erase-buffer))) |
| 4415 | (kill-buffer tembuf)))) | 4414 | (kill-buffer tembuf)))) |
| 4416 | 4415 | ||
| 4416 | (declare-function hashcash-wait-async "hashcash" (&optional buffer)) | ||
| 4417 | |||
| 4417 | (defun message-send-mail (&optional arg) | 4418 | (defun message-send-mail (&optional arg) |
| 4418 | (require 'mail-utils) | 4419 | (require 'mail-utils) |
| 4419 | (let* ((tembuf (message-generate-new-buffer-clone-locals " message temp")) | 4420 | (let* ((tembuf (message-generate-new-buffer-clone-locals " message temp")) |
| @@ -4421,14 +4422,26 @@ This function could be useful in `message-setup-hook'." | |||
| 4421 | (news (message-news-p)) | 4422 | (news (message-news-p)) |
| 4422 | (mailbuf (current-buffer)) | 4423 | (mailbuf (current-buffer)) |
| 4423 | (message-this-is-mail t) | 4424 | (message-this-is-mail t) |
| 4425 | ;; gnus-setup-posting-charset is autoloaded in mml.el (FIXME | ||
| 4426 | ;; maybe it should not be), which this file requires. Hence | ||
| 4427 | ;; the fboundp test is always true. Loading it from gnus-msg | ||
| 4428 | ;; loads many Gnus files (Bug#5642). If | ||
| 4429 | ;; gnus-group-posting-charset-alist hasn't been customized, | ||
| 4430 | ;; this is just going to return nil anyway. FIXME it would | ||
| 4431 | ;; be good to improve this further, because even if g-g-p-c-a | ||
| 4432 | ;; has been customized, that is likely to just be for news. | ||
| 4433 | ;; Eg either move the definition from gnus-msg, or separate out | ||
| 4434 | ;; the mail and news parts. | ||
| 4424 | (message-posting-charset | 4435 | (message-posting-charset |
| 4425 | (if (fboundp 'gnus-setup-posting-charset) | 4436 | (if (and (fboundp 'gnus-setup-posting-charset) |
| 4437 | (boundp 'gnus-group-posting-charset-alist)) | ||
| 4426 | (gnus-setup-posting-charset nil) | 4438 | (gnus-setup-posting-charset nil) |
| 4427 | message-posting-charset)) | 4439 | message-posting-charset)) |
| 4428 | (headers message-required-mail-headers)) | 4440 | (headers message-required-mail-headers)) |
| 4429 | (when (and message-generate-hashcash | 4441 | (when (and message-generate-hashcash |
| 4430 | (not (eq message-generate-hashcash 'opportunistic))) | 4442 | (not (eq message-generate-hashcash 'opportunistic))) |
| 4431 | (message "Generating hashcash...") | 4443 | (message "Generating hashcash...") |
| 4444 | (require 'hashcash) | ||
| 4432 | ;; Wait for calculations already started to finish... | 4445 | ;; Wait for calculations already started to finish... |
| 4433 | (hashcash-wait-async) | 4446 | (hashcash-wait-async) |
| 4434 | ;; ...and do calculations not already done. mail-add-payment | 4447 | ;; ...and do calculations not already done. mail-add-payment |
| @@ -4550,6 +4563,7 @@ If you always want Gnus to send messages in one piece, set | |||
| 4550 | 4563 | ||
| 4551 | (defun message-send-mail-with-sendmail () | 4564 | (defun message-send-mail-with-sendmail () |
| 4552 | "Send off the prepared buffer with sendmail." | 4565 | "Send off the prepared buffer with sendmail." |
| 4566 | (require 'sendmail) | ||
| 4553 | (let ((errbuf (if message-interactive | 4567 | (let ((errbuf (if message-interactive |
| 4554 | (message-generate-new-buffer-clone-locals | 4568 | (message-generate-new-buffer-clone-locals |
| 4555 | " sendmail errors") | 4569 | " sendmail errors") |
| @@ -4713,10 +4727,14 @@ Do not use this for anything important, it is cryptographically weak." | |||
| 4713 | (prin1-to-string (recent-keys)) | 4727 | (prin1-to-string (recent-keys)) |
| 4714 | (prin1-to-string (garbage-collect)))))) | 4728 | (prin1-to-string (garbage-collect)))))) |
| 4715 | 4729 | ||
| 4730 | (defvar canlock-password) | ||
| 4731 | (defvar canlock-password-for-verify) | ||
| 4732 | |||
| 4716 | (defun message-canlock-password () | 4733 | (defun message-canlock-password () |
| 4717 | "The password used by message for cancel locks. | 4734 | "The password used by message for cancel locks. |
| 4718 | This is the value of `canlock-password', if that option is non-nil. | 4735 | This is the value of `canlock-password', if that option is non-nil. |
| 4719 | Otherwise, generate and save a value for `canlock-password' first." | 4736 | Otherwise, generate and save a value for `canlock-password' first." |
| 4737 | (require 'canlock) | ||
| 4720 | (unless canlock-password | 4738 | (unless canlock-password |
| 4721 | (customize-save-variable 'canlock-password (message-canlock-generate)) | 4739 | (customize-save-variable 'canlock-password (message-canlock-generate)) |
| 4722 | (setq canlock-password-for-verify canlock-password)) | 4740 | (setq canlock-password-for-verify canlock-password)) |
| @@ -4727,7 +4745,12 @@ Otherwise, generate and save a value for `canlock-password' first." | |||
| 4727 | (message-canlock-password) | 4745 | (message-canlock-password) |
| 4728 | (canlock-insert-header))) | 4746 | (canlock-insert-header))) |
| 4729 | 4747 | ||
| 4748 | (autoload 'nnheader-get-report "nnheader") | ||
| 4749 | |||
| 4750 | (declare-function gnus-setup-posting-charset "gnus-msg" (group)) | ||
| 4751 | |||
| 4730 | (defun message-send-news (&optional arg) | 4752 | (defun message-send-news (&optional arg) |
| 4753 | (require 'gnus-msg) | ||
| 4731 | (let* ((tembuf (message-generate-new-buffer-clone-locals " *message temp*")) | 4754 | (let* ((tembuf (message-generate-new-buffer-clone-locals " *message temp*")) |
| 4732 | (case-fold-search nil) | 4755 | (case-fold-search nil) |
| 4733 | (method (if (functionp message-post-method) | 4756 | (method (if (functionp message-post-method) |
| @@ -5466,7 +5489,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'." | |||
| 5466 | (defun message-make-references () | 5489 | (defun message-make-references () |
| 5467 | "Return the References header for this message." | 5490 | "Return the References header for this message." |
| 5468 | (when message-reply-headers | 5491 | (when message-reply-headers |
| 5469 | (let ((message-id (mail-header-message-id message-reply-headers)) | 5492 | (let ((message-id (mail-header-id message-reply-headers)) |
| 5470 | (references (mail-header-references message-reply-headers))) | 5493 | (references (mail-header-references message-reply-headers))) |
| 5471 | (if (or references message-id) | 5494 | (if (or references message-id) |
| 5472 | (concat (or references "") (and references " ") | 5495 | (concat (or references "") (and references " ") |
| @@ -5478,7 +5501,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'." | |||
| 5478 | (when message-reply-headers | 5501 | (when message-reply-headers |
| 5479 | (let ((from (mail-header-from message-reply-headers)) | 5502 | (let ((from (mail-header-from message-reply-headers)) |
| 5480 | (date (mail-header-date message-reply-headers)) | 5503 | (date (mail-header-date message-reply-headers)) |
| 5481 | (msg-id (mail-header-message-id message-reply-headers))) | 5504 | (msg-id (mail-header-id message-reply-headers))) |
| 5482 | (when from | 5505 | (when from |
| 5483 | (let ((name (mail-extract-address-components from))) | 5506 | (let ((name (mail-extract-address-components from))) |
| 5484 | (concat | 5507 | (concat |
| @@ -8003,7 +8026,11 @@ From headers in the original article." | |||
| 8003 | (not result) | 8026 | (not result) |
| 8004 | result))) | 8027 | result))) |
| 8005 | 8028 | ||
| 8029 | (declare-function ecomplete-add-item "ecomplete" (type key text)) | ||
| 8030 | (declare-function ecomplete-save "ecomplete" ()) | ||
| 8031 | |||
| 8006 | (defun message-put-addresses-in-ecomplete () | 8032 | (defun message-put-addresses-in-ecomplete () |
| 8033 | (require 'ecomplete) | ||
| 8007 | (dolist (header '("to" "cc" "from" "reply-to")) | 8034 | (dolist (header '("to" "cc" "from" "reply-to")) |
| 8008 | (let ((value (message-field-value header))) | 8035 | (let ((value (message-field-value header))) |
| 8009 | (dolist (string (mail-header-parse-addresses value 'raw)) | 8036 | (dolist (string (mail-header-parse-addresses value 'raw)) |
| @@ -8014,6 +8041,8 @@ From headers in the original article." | |||
| 8014 | string)))) | 8041 | string)))) |
| 8015 | (ecomplete-save)) | 8042 | (ecomplete-save)) |
| 8016 | 8043 | ||
| 8044 | (autoload 'ecomplete-display-matches "ecomplete") | ||
| 8045 | |||
| 8017 | (defun message-display-abbrev (&optional choose) | 8046 | (defun message-display-abbrev (&optional choose) |
| 8018 | "Display the next possible abbrev for the text before point." | 8047 | "Display the next possible abbrev for the text before point." |
| 8019 | (interactive (list t)) | 8048 | (interactive (list t)) |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index a511253dddb..8bc659f5184 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el | |||
| @@ -29,12 +29,14 @@ | |||
| 29 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) | 29 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) |
| 30 | 30 | ||
| 31 | (require 'mail-parse) | 31 | (require 'mail-parse) |
| 32 | (require 'mailcap) | ||
| 33 | (require 'mm-bodies) | 32 | (require 'mm-bodies) |
| 34 | (require 'gnus-util) | ||
| 35 | (eval-when-compile (require 'cl) | 33 | (eval-when-compile (require 'cl) |
| 36 | (require 'term)) | 34 | (require 'term)) |
| 37 | 35 | ||
| 36 | (autoload 'gnus-map-function "gnus-util") | ||
| 37 | (autoload 'gnus-replace-in-string "gnus-util") | ||
| 38 | (autoload 'gnus-read-shell-command "gnus-util") | ||
| 39 | |||
| 38 | (autoload 'mm-inline-partial "mm-partial") | 40 | (autoload 'mm-inline-partial "mm-partial") |
| 39 | (autoload 'mm-inline-external-body "mm-extern") | 41 | (autoload 'mm-inline-external-body "mm-extern") |
| 40 | (autoload 'mm-extern-cache-contents "mm-extern") | 42 | (autoload 'mm-extern-cache-contents "mm-extern") |
| @@ -550,6 +552,8 @@ Postpone undisplaying of viewers for types in | |||
| 550 | (message "Destroying external MIME viewers") | 552 | (message "Destroying external MIME viewers") |
| 551 | (mm-destroy-parts mm-postponed-undisplay-list))) | 553 | (mm-destroy-parts mm-postponed-undisplay-list))) |
| 552 | 554 | ||
| 555 | (autoload 'message-fetch-field "message") | ||
| 556 | |||
| 553 | (defun mm-dissect-buffer (&optional no-strict-mime loose-mime from) | 557 | (defun mm-dissect-buffer (&optional no-strict-mime loose-mime from) |
| 554 | "Dissect the current buffer and return a list of MIME handles." | 558 | "Dissect the current buffer and return a list of MIME handles." |
| 555 | (save-excursion | 559 | (save-excursion |
| @@ -688,6 +692,9 @@ Postpone undisplaying of viewers for types in | |||
| 688 | (goto-char (point-max))) | 692 | (goto-char (point-max))) |
| 689 | (mapcar 'mm-display-parts handle)))) | 693 | (mapcar 'mm-display-parts handle)))) |
| 690 | 694 | ||
| 695 | (autoload 'mailcap-parse-mailcaps "mailcap") | ||
| 696 | (autoload 'mailcap-mime-info "mailcap") | ||
| 697 | |||
| 691 | (defun mm-display-part (handle &optional no-default) | 698 | (defun mm-display-part (handle &optional no-default) |
| 692 | "Display the MIME part represented by HANDLE. | 699 | "Display the MIME part represented by HANDLE. |
| 693 | Returns nil if the part is removed; inline if displayed inline; | 700 | Returns nil if the part is removed; inline if displayed inline; |
| @@ -747,6 +754,7 @@ external if displayed external." | |||
| 747 | handle 'mailcap-save-binary-file))))))))) | 754 | handle 'mailcap-save-binary-file))))))))) |
| 748 | 755 | ||
| 749 | (declare-function gnus-configure-windows "gnus-win" (setting &optional force)) | 756 | (declare-function gnus-configure-windows "gnus-win" (setting &optional force)) |
| 757 | (defvar mailcap-mime-extensions) ; mailcap-mime-info autoloads | ||
| 750 | 758 | ||
| 751 | (defun mm-display-external (handle method) | 759 | (defun mm-display-external (handle method) |
| 752 | "Display HANDLE using METHOD." | 760 | "Display HANDLE using METHOD." |
diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el index a32927b8ae3..0d609e56cbb 100644 --- a/lisp/gnus/mm-encode.el +++ b/lisp/gnus/mm-encode.el | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | (eval-when-compile (require 'cl)) | 27 | (eval-when-compile (require 'cl)) |
| 28 | (require 'mail-parse) | 28 | (require 'mail-parse) |
| 29 | (require 'mailcap) | 29 | (autoload 'mailcap-extension-to-mime "mailcap") |
| 30 | (autoload 'mm-body-7-or-8 "mm-bodies") | 30 | (autoload 'mm-body-7-or-8 "mm-bodies") |
| 31 | (autoload 'mm-long-lines-p "mm-bodies") | 31 | (autoload 'mm-long-lines-p "mm-bodies") |
| 32 | 32 | ||
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 98142298c04..e394593ec12 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el | |||
| @@ -26,10 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | (eval-when-compile (require 'cl)) | 27 | (eval-when-compile (require 'cl)) |
| 28 | 28 | ||
| 29 | (if (locate-library "password-cache") | ||
| 30 | (require 'password-cache) | ||
| 31 | (require 'password)) | ||
| 32 | |||
| 33 | (autoload 'mml2015-sign "mml2015") | 29 | (autoload 'mml2015-sign "mml2015") |
| 34 | (autoload 'mml2015-encrypt "mml2015") | 30 | (autoload 'mml2015-encrypt "mml2015") |
| 35 | (autoload 'mml1991-sign "mml1991") | 31 | (autoload 'mml1991-sign "mml1991") |
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 87fcdf5b09c..f262dc6b3cb 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | (eval-when-compile (require 'cl)) | 35 | (eval-when-compile (require 'cl)) |
| 36 | 36 | ||
| 37 | (autoload 'message-make-message-id "message") | 37 | (autoload 'message-make-message-id "message") |
| 38 | (autoload 'gnus-setup-posting-charset "gnus-msg") | 38 | (declare-function gnus-setup-posting-charset "gnus-msg" (group)) |
| 39 | (autoload 'gnus-make-local-hook "gnus-util") | 39 | (autoload 'gnus-make-local-hook "gnus-util") |
| 40 | (autoload 'message-fetch-field "message") | 40 | (autoload 'message-fetch-field "message") |
| 41 | (autoload 'message-mark-active-p "message") | 41 | (autoload 'message-mark-active-p "message") |
| @@ -1173,7 +1173,11 @@ If not set, `default-directory' will be used." | |||
| 1173 | (error "Permission denied: %s" file)) | 1173 | (error "Permission denied: %s" file)) |
| 1174 | file)) | 1174 | file)) |
| 1175 | 1175 | ||
| 1176 | (declare-function mailcap-parse-mimetypes "mailcap" (&optional path force)) | ||
| 1177 | (declare-function mailcap-mime-types "mailcap" ()) | ||
| 1178 | |||
| 1176 | (defun mml-minibuffer-read-type (name &optional default) | 1179 | (defun mml-minibuffer-read-type (name &optional default) |
| 1180 | (require 'mailcap) | ||
| 1177 | (mailcap-parse-mimetypes) | 1181 | (mailcap-parse-mimetypes) |
| 1178 | (let* ((default (or default | 1182 | (let* ((default (or default |
| 1179 | (mm-default-file-encoding name) | 1183 | (mm-default-file-encoding name) |
| @@ -1445,6 +1449,7 @@ or the `pop-to-buffer' function." | |||
| 1445 | (setq mml-preview-buffer (generate-new-buffer | 1449 | (setq mml-preview-buffer (generate-new-buffer |
| 1446 | (concat (if raw "*Raw MIME preview of " | 1450 | (concat (if raw "*Raw MIME preview of " |
| 1447 | "*MIME preview of ") (buffer-name)))) | 1451 | "*MIME preview of ") (buffer-name)))) |
| 1452 | (require 'gnus-msg) ; for gnus-setup-posting-charset | ||
| 1448 | (save-excursion | 1453 | (save-excursion |
| 1449 | (let* ((buf (current-buffer)) | 1454 | (let* ((buf (current-buffer)) |
| 1450 | (message-options message-options) | 1455 | (message-options message-options) |
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index c523dccc055..a3ada29fa66 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el | |||
| @@ -28,7 +28,11 @@ | |||
| 28 | 28 | ||
| 29 | ;; For Emacs < 22.2. | 29 | ;; For Emacs < 22.2. |
| 30 | (eval-and-compile | 30 | (eval-and-compile |
| 31 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) | 31 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) |
| 32 | |||
| 33 | (if (locate-library "password-cache") | ||
| 34 | (require 'password-cache) | ||
| 35 | (require 'password))) | ||
| 32 | 36 | ||
| 33 | (eval-when-compile | 37 | (eval-when-compile |
| 34 | (require 'cl) | 38 | (require 'cl) |
| @@ -329,7 +333,6 @@ Whether the passphrase is cached at all is controlled by | |||
| 329 | ;; epg wrapper | 333 | ;; epg wrapper |
| 330 | 334 | ||
| 331 | (defvar epg-user-id-alist) | 335 | (defvar epg-user-id-alist) |
| 332 | (defvar password-cache-expiry) | ||
| 333 | 336 | ||
| 334 | (autoload 'epg-make-context "epg") | 337 | (autoload 'epg-make-context "epg") |
| 335 | (autoload 'epg-passphrase-callback-function "epg") | 338 | (autoload 'epg-passphrase-callback-function "epg") |
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 65cf1a8f426..6725709c044 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el | |||
| @@ -30,7 +30,11 @@ | |||
| 30 | 30 | ||
| 31 | ;; For Emacs < 22.2. | 31 | ;; For Emacs < 22.2. |
| 32 | (eval-and-compile | 32 | (eval-and-compile |
| 33 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) | 33 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) |
| 34 | |||
| 35 | (if (locate-library "password-cache") | ||
| 36 | (require 'password-cache) | ||
| 37 | (require 'password))) | ||
| 34 | 38 | ||
| 35 | (eval-when-compile (require 'cl)) | 39 | (eval-when-compile (require 'cl)) |
| 36 | (require 'mm-decode) | 40 | (require 'mm-decode) |
| @@ -986,8 +990,6 @@ Whether the passphrase is cached at all is controlled by | |||
| 986 | (autoload 'epg-expand-group "epg-config") | 990 | (autoload 'epg-expand-group "epg-config") |
| 987 | (autoload 'epa-select-keys "epa") | 991 | (autoload 'epa-select-keys "epa") |
| 988 | 992 | ||
| 989 | (defvar password-cache-expiry) | ||
| 990 | |||
| 991 | (defvar mml2015-epg-secret-key-id-list nil) | 993 | (defvar mml2015-epg-secret-key-id-list nil) |
| 992 | 994 | ||
| 993 | (defun mml2015-epg-passphrase-callback (context key-id ignore) | 995 | (defun mml2015-epg-passphrase-callback (context key-id ignore) |
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el index f92c47eba04..2a80d867e56 100644 --- a/lisp/gnus/nneething.el +++ b/lisp/gnus/nneething.el | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | (eval-when-compile (require 'cl)) | 29 | (eval-when-compile (require 'cl)) |
| 30 | 30 | ||
| 31 | (require 'mailcap) | ||
| 31 | (require 'nnheader) | 32 | (require 'nnheader) |
| 32 | (require 'nnmail) | 33 | (require 'nnmail) |
| 33 | (require 'nnoo) | 34 | (require 'nnoo) |
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index f3283022db9..6a24f21efc1 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | 27 | ||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | (eval-and-compile | ||
| 31 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) | ||
| 30 | (eval-when-compile (require 'cl)) | 32 | (eval-when-compile (require 'cl)) |
| 31 | 33 | ||
| 32 | (defvar nnmail-extra-headers) | 34 | (defvar nnmail-extra-headers) |
| @@ -121,7 +123,6 @@ on your system, you could say something like: | |||
| 121 | 123 | ||
| 122 | (autoload 'nnmail-message-id "nnmail") | 124 | (autoload 'nnmail-message-id "nnmail") |
| 123 | (autoload 'mail-position-on-field "sendmail") | 125 | (autoload 'mail-position-on-field "sendmail") |
| 124 | (autoload 'message-remove-header "message") | ||
| 125 | (autoload 'gnus-buffer-live-p "gnus-util") | 126 | (autoload 'gnus-buffer-live-p "gnus-util") |
| 126 | 127 | ||
| 127 | ;;; Header access macros. | 128 | ;;; Header access macros. |
| @@ -662,8 +663,12 @@ the line could be found." | |||
| 662 | ;; without inserting extra newline. | 663 | ;; without inserting extra newline. |
| 663 | (fill-region-as-paragraph begin (1+ (point)))))) | 664 | (fill-region-as-paragraph begin (1+ (point)))))) |
| 664 | 665 | ||
| 666 | (declare-function message-remove-header "message" | ||
| 667 | (header &optional is-regexp first reverse)) | ||
| 668 | |||
| 665 | (defun nnheader-replace-header (header new-value) | 669 | (defun nnheader-replace-header (header new-value) |
| 666 | "Remove HEADER and insert the NEW-VALUE." | 670 | "Remove HEADER and insert the NEW-VALUE." |
| 671 | (require 'message) | ||
| 667 | (save-excursion | 672 | (save-excursion |
| 668 | (save-restriction | 673 | (save-restriction |
| 669 | (nnheader-narrow-to-headers) | 674 | (nnheader-narrow-to-headers) |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 6d97c060a96..b939f50e0fc 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -59,6 +59,10 @@ | |||
| 59 | 59 | ||
| 60 | ;;; Code: | 60 | ;;; Code: |
| 61 | 61 | ||
| 62 | ;; For Emacs < 22.2. | ||
| 63 | (eval-and-compile | ||
| 64 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) | ||
| 65 | |||
| 62 | (require 'imap) | 66 | (require 'imap) |
| 63 | (require 'nnoo) | 67 | (require 'nnoo) |
| 64 | (require 'nnmail) | 68 | (require 'nnmail) |
| @@ -789,12 +793,17 @@ If EXAMINE is non-nil the group is selected read-only." | |||
| 789 | (nnheader-nov-delete-outside-range low high)))) | 793 | (nnheader-nov-delete-outside-range low high)))) |
| 790 | 'nov))) | 794 | 'nov))) |
| 791 | 795 | ||
| 796 | (declare-function netrc-parse "netrc" (file)) | ||
| 797 | (declare-function netrc-machine-user-or-password "netrc" | ||
| 798 | (mode authinfo-file-or-list machines ports defaults)) | ||
| 799 | |||
| 792 | (defun nnimap-open-connection (server) | 800 | (defun nnimap-open-connection (server) |
| 793 | ;; Note: `nnimap-open-server' that calls this function binds | 801 | ;; Note: `nnimap-open-server' that calls this function binds |
| 794 | ;; `imap-logout-timeout' to `nnimap-logout-timeout'. | 802 | ;; `imap-logout-timeout' to `nnimap-logout-timeout'. |
| 795 | (if (not (imap-open nnimap-address nnimap-server-port nnimap-stream | 803 | (if (not (imap-open nnimap-address nnimap-server-port nnimap-stream |
| 796 | nnimap-authenticator nnimap-server-buffer)) | 804 | nnimap-authenticator nnimap-server-buffer)) |
| 797 | (nnheader-report 'nnimap "Can't open connection to server %s" server) | 805 | (nnheader-report 'nnimap "Can't open connection to server %s" server) |
| 806 | (require 'netrc) | ||
| 798 | (unless (or (imap-capability 'IMAP4 nnimap-server-buffer) | 807 | (unless (or (imap-capability 'IMAP4 nnimap-server-buffer) |
| 799 | (imap-capability 'IMAP4rev1 nnimap-server-buffer)) | 808 | (imap-capability 'IMAP4rev1 nnimap-server-buffer)) |
| 800 | (imap-close nnimap-server-buffer) | 809 | (imap-close nnimap-server-buffer) |
| @@ -805,7 +814,7 @@ If EXAMINE is non-nil the group is selected read-only." | |||
| 805 | (port (if nnimap-server-port | 814 | (port (if nnimap-server-port |
| 806 | (int-to-string nnimap-server-port) | 815 | (int-to-string nnimap-server-port) |
| 807 | "imap")) | 816 | "imap")) |
| 808 | (auth-info | 817 | (auth-info |
| 809 | (auth-source-user-or-password '("login" "password") server port)) | 818 | (auth-source-user-or-password '("login" "password") server port)) |
| 810 | (auth-user (nth 0 auth-info)) | 819 | (auth-user (nth 0 auth-info)) |
| 811 | (auth-passwd (nth 1 auth-info)) | 820 | (auth-passwd (nth 1 auth-info)) |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 6e42a1fa31d..03e0168de49 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -26,6 +26,10 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | ;; For Emacs < 22.2. | ||
| 30 | (eval-and-compile | ||
| 31 | (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) | ||
| 32 | |||
| 29 | (require 'nnheader) | 33 | (require 'nnheader) |
| 30 | (require 'nnoo) | 34 | (require 'nnoo) |
| 31 | (require 'gnus-util) | 35 | (require 'gnus-util) |
| @@ -1168,6 +1172,11 @@ It will make innd servers spawn an nnrpd process to allow actual article | |||
| 1168 | reading." | 1172 | reading." |
| 1169 | (nntp-send-command "^.*\n" "MODE READER")) | 1173 | (nntp-send-command "^.*\n" "MODE READER")) |
| 1170 | 1174 | ||
| 1175 | (declare-function netrc-parse "netrc" (file)) | ||
| 1176 | (declare-function netrc-machine "netrc" | ||
| 1177 | (list machine &optional port defaultport)) | ||
| 1178 | (declare-function netrc-get "netrc" (alist type)) | ||
| 1179 | |||
| 1171 | (defun nntp-send-authinfo (&optional send-if-force) | 1180 | (defun nntp-send-authinfo (&optional send-if-force) |
| 1172 | "Send the AUTHINFO to the nntp server. | 1181 | "Send the AUTHINFO to the nntp server. |
| 1173 | It will look in the \"~/.authinfo\" file for matching entries. If | 1182 | It will look in the \"~/.authinfo\" file for matching entries. If |
| @@ -1176,10 +1185,11 @@ and a password. | |||
| 1176 | 1185 | ||
| 1177 | If SEND-IF-FORCE, only send authinfo to the server if the | 1186 | If SEND-IF-FORCE, only send authinfo to the server if the |
| 1178 | .authinfo file has the FORCE token." | 1187 | .authinfo file has the FORCE token." |
| 1188 | (require 'netrc) | ||
| 1179 | (let* ((list (netrc-parse nntp-authinfo-file)) | 1189 | (let* ((list (netrc-parse nntp-authinfo-file)) |
| 1180 | (alist (netrc-machine list nntp-address "nntp")) | 1190 | (alist (netrc-machine list nntp-address "nntp")) |
| 1181 | (force (or (netrc-get alist "force") nntp-authinfo-force)) | 1191 | (force (or (netrc-get alist "force") nntp-authinfo-force)) |
| 1182 | (auth-info | 1192 | (auth-info |
| 1183 | (auth-source-user-or-password '("login" "password") nntp-address "nntp")) | 1193 | (auth-source-user-or-password '("login" "password") nntp-address "nntp")) |
| 1184 | (auth-user (nth 0 auth-info)) | 1194 | (auth-user (nth 0 auth-info)) |
| 1185 | (auth-passwd (nth 1 auth-info)) | 1195 | (auth-passwd (nth 1 auth-info)) |
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index 793aa1f32dc..e13dffccdac 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el | |||
| @@ -31,7 +31,6 @@ | |||
| 31 | (require 'cl)) | 31 | (require 'cl)) |
| 32 | (defvar message-posting-charset) | 32 | (defvar message-posting-charset) |
| 33 | 33 | ||
| 34 | (require 'qp) | ||
| 35 | (require 'mm-util) | 34 | (require 'mm-util) |
| 36 | (require 'ietf-drums) | 35 | (require 'ietf-drums) |
| 37 | ;; Fixme: Avoid this (used for mail-parse-charset) mm dependence on gnus. | 36 | ;; Fixme: Avoid this (used for mail-parse-charset) mm dependence on gnus. |
| @@ -827,6 +826,8 @@ Point moves to the end of the region." | |||
| 827 | "Base64-encode the header contained in STRING." | 826 | "Base64-encode the header contained in STRING." |
| 828 | (base64-encode-string string t)) | 827 | (base64-encode-string string t)) |
| 829 | 828 | ||
| 829 | (autoload 'quoted-printable-encode-region "qp") | ||
| 830 | |||
| 830 | (defun rfc2047-q-encode-string (string) | 831 | (defun rfc2047-q-encode-string (string) |
| 831 | "Quoted-printable-encode the header in STRING." | 832 | "Quoted-printable-encode the header in STRING." |
| 832 | (mm-with-unibyte-buffer | 833 | (mm-with-unibyte-buffer |
| @@ -929,6 +930,8 @@ only be used for decoding, not for encoding." | |||
| 929 | 'raw-text | 930 | 'raw-text |
| 930 | cs))) | 931 | cs))) |
| 931 | 932 | ||
| 933 | (autoload 'quoted-printable-decode-string "qp") | ||
| 934 | |||
| 932 | (defun rfc2047-decode-encoded-words (words) | 935 | (defun rfc2047-decode-encoded-words (words) |
| 933 | "Decode successive encoded-words in WORDS and return a decoded string. | 936 | "Decode successive encoded-words in WORDS and return a decoded string. |
| 934 | Each element of WORDS looks like (CHARSET ENCODING ENCODED-TEXT | 937 | Each element of WORDS looks like (CHARSET ENCODING ENCODED-TEXT |
diff --git a/lisp/gnus/sieve-mode.el b/lisp/gnus/sieve-mode.el index 99ec57ce38b..f765589e7a0 100644 --- a/lisp/gnus/sieve-mode.el +++ b/lisp/gnus/sieve-mode.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; sieve-mode.el --- Sieve code editing commands for Emacs | 1 | ;;; sieve-mode.el --- Sieve code editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Simon Josefsson <simon@josefsson.org> | 6 | ;; Author: Simon Josefsson <simon@josefsson.org> |
| 7 | 7 | ||
| @@ -49,7 +49,6 @@ | |||
| 49 | 49 | ||
| 50 | (autoload 'sieve-manage "sieve") | 50 | (autoload 'sieve-manage "sieve") |
| 51 | (autoload 'sieve-upload "sieve") | 51 | (autoload 'sieve-upload "sieve") |
| 52 | (require 'easymenu) | ||
| 53 | (eval-when-compile | 52 | (eval-when-compile |
| 54 | (require 'font-lock)) | 53 | (require 'font-lock)) |
| 55 | 54 | ||
| @@ -186,6 +185,7 @@ | |||
| 186 | "Menubar used in sieve mode.") | 185 | "Menubar used in sieve mode.") |
| 187 | 186 | ||
| 188 | ;; Code for Sieve editing mode. | 187 | ;; Code for Sieve editing mode. |
| 188 | (autoload 'easy-menu-add-item "easymenu") | ||
| 189 | 189 | ||
| 190 | ;;;###autoload | 190 | ;;;###autoload |
| 191 | (define-derived-mode sieve-mode c-mode "Sieve" | 191 | (define-derived-mode sieve-mode c-mode "Sieve" |
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el index 45c596539c9..69fc2016a65 100644 --- a/lisp/gnus/spam-stat.el +++ b/lisp/gnus/spam-stat.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; spam-stat.el --- detecting spam based on statistics | 1 | ;;; spam-stat.el --- detecting spam based on statistics |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
| 4 | ;; 2010 Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Alex Schroeder <alex@gnu.org> | 6 | ;; Author: Alex Schroeder <alex@gnu.org> |
| 6 | ;; Keywords: network | 7 | ;; Keywords: network |
| @@ -557,6 +558,8 @@ check the variable `spam-stat-score-data'." | |||
| 557 | (when (re-search-forward "^Xref:.*\n" nil t) | 558 | (when (re-search-forward "^Xref:.*\n" nil t) |
| 558 | (delete-region (match-beginning 0) (match-end 0))))) | 559 | (delete-region (match-beginning 0) (match-end 0))))) |
| 559 | 560 | ||
| 561 | (autoload 'time-to-number-of-days "time-date") | ||
| 562 | |||
| 560 | (defun spam-stat-process-directory (dir func) | 563 | (defun spam-stat-process-directory (dir func) |
| 561 | "Process all the regular files in directory DIR using function FUNC." | 564 | "Process all the regular files in directory DIR using function FUNC." |
| 562 | (let* ((files (directory-files dir t "^[^.]")) | 565 | (let* ((files (directory-files dir t "^[^.]")) |
diff --git a/lisp/password-cache.el b/lisp/password-cache.el index 301201ea0eb..126205a532f 100644 --- a/lisp/password-cache.el +++ b/lisp/password-cache.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; password-cache.el --- Read passwords, possibly using a password cache. | 1 | ;;; password-cache.el --- Read passwords, possibly using a password cache. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 3 | ;; Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Simon Josefsson <simon@josefsson.org> | 6 | ;; Author: Simon Josefsson <simon@josefsson.org> |
| 7 | ;; Created: 2003-12-21 | 7 | ;; Created: 2003-12-21 |
| @@ -51,11 +51,15 @@ | |||
| 51 | 51 | ||
| 52 | ;;; Code: | 52 | ;;; Code: |
| 53 | 53 | ||
| 54 | ;; Options are autoloaded since they are used by eg mml-sec.el. | ||
| 55 | |||
| 56 | ;;;###autoload | ||
| 54 | (defcustom password-cache t | 57 | (defcustom password-cache t |
| 55 | "Whether to cache passwords." | 58 | "Whether to cache passwords." |
| 56 | :group 'password | 59 | :group 'password |
| 57 | :type 'boolean) | 60 | :type 'boolean) |
| 58 | 61 | ||
| 62 | ;;;###autoload | ||
| 59 | (defcustom password-cache-expiry 16 | 63 | (defcustom password-cache-expiry 16 |
| 60 | "How many seconds passwords are cached, or nil to disable expiring. | 64 | "How many seconds passwords are cached, or nil to disable expiring. |
| 61 | Whether passwords are cached at all is controlled by `password-cache'." | 65 | Whether passwords are cached at all is controlled by `password-cache'." |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 7309402a848..639c919924e 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-03-19 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * url.el: Move mailcap require earlier in the file. | ||
| 4 | |||
| 1 | 2010-03-12 Chong Yidong <cyd@stupidchicken.com> | 5 | 2010-03-12 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * url-vars.el (url): Put in comm group. | 7 | * url-vars.el (url): Put in comm group. |
diff --git a/lisp/url/url.el b/lisp/url/url.el index 9f47e104043..6f7b810f0ed 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; url.el --- Uniform Resource Locator retrieval tool | 1 | ;;; url.el --- Uniform Resource Locator retrieval tool |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, | 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2006, 2007, |
| 4 | ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Bill Perry <wmperry@gnu.org> | 6 | ;; Author: Bill Perry <wmperry@gnu.org> |
| 7 | ;; Keywords: comm, data, processes, hypermedia | 7 | ;; Keywords: comm, data, processes, hypermedia |
| @@ -29,11 +29,12 @@ | |||
| 29 | 29 | ||
| 30 | (eval-when-compile (require 'cl)) | 30 | (eval-when-compile (require 'cl)) |
| 31 | 31 | ||
| 32 | (require 'mailcap) | ||
| 33 | |||
| 32 | (eval-when-compile | 34 | (eval-when-compile |
| 33 | (require 'mm-decode) | 35 | (require 'mm-decode) |
| 34 | (require 'mm-view)) | 36 | (require 'mm-view)) |
| 35 | 37 | ||
| 36 | (require 'mailcap) | ||
| 37 | (require 'url-vars) | 38 | (require 'url-vars) |
| 38 | (require 'url-cookie) | 39 | (require 'url-cookie) |
| 39 | (require 'url-history) | 40 | (require 'url-history) |