Changes committed gnus/lisp (23 files)
"Katsumi Yamaoka" <[email protected]> Tue, 23 Mar 2010 09:23:42 +0100
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog auth-source.el gmm-utils.el gnus-art.el gnus-util.el
ietf-drums.el lpath.el message.el mm-decode.el mm-encode.el
mml-sec.el mml.el mml1991.el mml2015.el nneething.el nnheader.el
nnimap.el nntp.el password-cache.el pop3.el rfc2047.el
sieve-mode.el spam-stat.el
Synch with Emacs trunk
======================
2010-03-23 Katsumi Yamaoka <[email protected]>
* gnus-art.el (canlock-verify): Autoload it for Emacs 21.
* message.el (ecomplete-setup): Autoload it for Emacs <23.
* mml-sec.el (mml-secure-cache-passphrase): Default to t that is
password-cache's default if it is not bound.
(mml-secure-passphrase-cache-expiry): Default to 16 that is
password-cache-expiry's default if it is not bound.
* pop3.el (pop3-list): Don't use 3rd arg of `split-string' which is not
available in Emacs 21.
* lpath.el: Suppress compiler warnings for:
canlock-insert-header and smtpmail-default-smtp-server for Emacs 21 and
XEmacs;
ecomplete-add-item, ecomplete-save, hashcash-wait-async,
mail-add-payment, mail-add-payment-async, netrc-get, netrc-machine,
netrc-machine-user-or-password and netrc-parse for Emacs 22 and XEmacs.
2010-03-19 Michael Albinus <[email protected]>
* auth-source.el (netrc-machine-user-or-password): Autoload.
2010-03-19 Glenn Morris <[email protected]>
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)
* gmm-utils.el: Don't require wid-edit.
(widget-create-child-value, widget-convert, widget-default-get):
Autoload.
* 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.
* ietf-drums.el: Don't require time-date.
* 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.
* 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.
* mm-encode.el: Don't require mailcap.
(mailcap-extension-to-mime): Autoload.
* mml-sec.el: Don't require password-cache.
* 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.
* mml1991.el: Require password-cache.
(password-cache-expiry): Remove declaration.
* mml2015.el: Require password-cache.
(password-cache-expiry): Remove declaration.
* nneething.el (mailcap): Require mailcap.
* nnheader.el: (declare-function): Add compatibility stub.
(message-remove-header): Declare rather than autoload.
(nnheader-replace-header): Require message.
* nnimap.el (declare-function): Add compatibility stub.
(netrc-parse, netrc-machine-user-or-password): Declare.
(nnimap-open-connection): Require netrc.
* nntp.el (declare-function): Add compatibility stub.
(netrc-parse, netrc-machine, netrc-get): Declare.
(nntp-send-authinfo): Require netrc.
* rfc2047.el: Don't require qp.
(quoted-printable-encode-region, quoted-printable-decode-string):
Autoload.
* sieve-mode.el: Don't require easymenu.
(easy-menu-add-item): Autoload it.
* spam-stat.el (time-to-number-of-days): Autoload it.
2010-03-19 Glenn Morris <[email protected]>
* password-cache.el (password-cache, password-cache-expiry): Autoload.
Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.2072 gnus/lisp/ChangeLog:7.2073
--- ChangeLog:7.2072 Tue Mar 23 03:54:14 2010
+++ ChangeLog Tue Mar 23 09:23:42 2010
@@ -1,14 +1,36 @@
+2010-03-23 Katsumi Yamaoka <[email protected]>
+
+ * gnus-art.el (canlock-verify): Autoload it for Emacs 21.
+
+ * message.el (ecomplete-setup): Autoload it for Emacs <23.
+
+ * mml-sec.el (mml-secure-cache-passphrase): Default to t that is
+ password-cache's default if it is not bound.
+ (mml-secure-passphrase-cache-expiry): Default to 16 that is
+ password-cache-expiry's default if it is not bound.
+
+ * pop3.el (pop3-list): Don't use 3rd arg of `split-string' which is not
+ available in Emacs 21.
+
+ * lpath.el: Suppress compiler warnings for:
+ canlock-insert-header and smtpmail-default-smtp-server for Emacs 21 and
+ XEmacs;
+ ecomplete-add-item, ecomplete-save, hashcash-wait-async,
+ mail-add-payment, mail-add-payment-async, netrc-get, netrc-machine,
+ netrc-machine-user-or-password and netrc-parse for Emacs 22 and XEmacs.
+
2010-03-23 Teodor Zlatanov <[email protected]>
* auth-source.el (auth-sources): Fix up definition so extra parameters
are always inline.
-2010-03-22 Martin Stjernholm <[email protected]>
+2010-03-22 Martin Stjernholm <[email protected]>
* nnimap.el (nnimap-verify-uidvalidity): Fixed bug where uidvalidity
wasn't updated after mismatch. Clear cached mailbox info correctly
when uidvalidity changes.
- (nnimap-group-prefixed-name): New function to avoid some code duplication.
+ (nnimap-group-prefixed-name): New function to avoid some code
+ duplication.
(nnimap-verify-uidvalidity, nnimap-group-overview-filename)
(nnimap-request-group): Use it.
(nnimap-retrieve-groups, nnimap-verify-uidvalidity)
@@ -42,7 +64,7 @@
(gnus-registry-install-shortcuts): Populate and use it in a
`gnus-summary-menu-hook' lambda, under "Gnus"->"Registry Marks".
-2010-03-20 Martin Stjernholm <[email protected]>
+2010-03-20 Martin Stjernholm <[email protected]>
* nnimap.el (nnimap-decode-group-name, nnimap-encode-group-name):
In-place substitutions for the group name encoding/decoding.
@@ -63,19 +85,113 @@
* gnus-agent.el (gnus-agent-fetch-articles, gnus-agent-fetch-headers)
(gnus-agent-regenerate-group): Use `gnus-agent-decoded-group-name'.
-2010-03-20 Bojan Petrovic <[email protected]>
+2010-03-20 Bojan Petrovic <[email protected]>
* pop3.el (pop3-display-message-size-flag): Display message size byte
counts during POP3 download.
(pop3-movemail): Use it.
(pop3-list): Implement listing of available messages.
-2010-03-20 Mark Triggs <[email protected]> (tiny change)
+2010-03-20 Mark Triggs <[email protected]> (tiny change)
* nnir.el (nnir-get-article-nov-override-function): New function to
override the normal NOV retrieval.
(nnir-retrieve-headers): Use it.
+2010-03-19 Michael Albinus <[email protected]>
+
+ * auth-source.el (netrc-machine-user-or-password): Autoload.
+
+2010-03-19 Glenn Morris <[email protected]>
+
+ 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)
+
+ * gmm-utils.el: Don't require wid-edit.
+ (widget-create-child-value, widget-convert, widget-default-get):
+ Autoload.
+
+ * 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.
+
+ * ietf-drums.el: Don't require time-date.
+
+ * 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.
+
+ * 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.
+
+ * mm-encode.el: Don't require mailcap.
+ (mailcap-extension-to-mime): Autoload.
+
+ * mml-sec.el: Don't require password-cache.
+
+ * 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.
+
+ * mml1991.el: Require password-cache.
+ (password-cache-expiry): Remove declaration.
+
+ * mml2015.el: Require password-cache.
+ (password-cache-expiry): Remove declaration.
+
+ * nneething.el (mailcap): Require mailcap.
+
+ * nnheader.el: (declare-function): Add compatibility stub.
+ (message-remove-header): Declare rather than autoload.
+ (nnheader-replace-header): Require message.
+
+ * nnimap.el (declare-function): Add compatibility stub.
+ (netrc-parse, netrc-machine-user-or-password): Declare.
+ (nnimap-open-connection): Require netrc.
+
+ * nntp.el (declare-function): Add compatibility stub.
+ (netrc-parse, netrc-machine, netrc-get): Declare.
+ (nntp-send-authinfo): Require netrc.
+
+ * rfc2047.el: Don't require qp.
+ (quoted-printable-encode-region, quoted-printable-decode-string):
+ Autoload.
+
+ * sieve-mode.el: Don't require easymenu.
+ (easy-menu-add-item): Autoload it.
+
+ * spam-stat.el (time-to-number-of-days): Autoload it.
+
+2010-03-19 Glenn Morris <[email protected]>
+
+ * password-cache.el (password-cache, password-cache-expiry): Autoload.
+
2010-03-18 Glenn Morris <[email protected]>
* hashcash.el (declare-function): Remove duplicate definition.
Index: auth-source.el
diff -u gnus/lisp/auth-source.el:7.20 gnus/lisp/auth-source.el:7.21
--- auth-source.el:7.20 Tue Mar 23 03:54:14 2010
+++ auth-source.el Tue Mar 23 09:23:42 2010
@@ -34,8 +34,7 @@
(require 'gnus-util)
(eval-when-compile (require 'cl))
-(eval-when-compile (require 'netrc))
-
+(autoload 'netrc-machine-user-or-password "netrc")
(autoload 'secrets-search-items "secrets")
(autoload 'secrets-get-alias "secrets")
(autoload 'secrets-get-attribute "secrets")
@@ -90,7 +89,7 @@
that function using the same arguments as `message'."
:group 'auth-source
:version "23.2" ;; No Gnus
- :type `(choice
+ :type `(choice
:tag "auth-source debugging mode"
(const :tag "Log using `message' to the *Messages* buffer" t)
(function :tag "Function that takes arguments like `message'")
@@ -170,7 +169,7 @@
;; we also check the value
(when auth-source-debug
(let ((logger (if (functionp auth-source-debug)
- auth-source-debug
+ auth-source-debug
'message)))
(apply logger msg))))
Index: gmm-utils.el
diff -u gnus/lisp/gmm-utils.el:7.40 gnus/lisp/gmm-utils.el:7.41
--- gmm-utils.el:7.40 Wed Jan 13 11:59:43 2010
+++ gmm-utils.el Tue Mar 23 09:23:42 2010
@@ -28,8 +28,6 @@
;;; Code:
-(require 'wid-edit)
-
(defgroup gmm nil
"Utility functions for Gnus, Message and MML."
:prefix "gmm-"
@@ -95,6 +93,10 @@
"Non-nil if SYMBOL is a widget."
(get symbol 'widget-type))
+(autoload 'widget-create-child-value "wid-edit")
+(autoload 'widget-convert "wid-edit")
+(autoload 'widget-default-get "wid-edit")
+
;; Copy of the `nnmail-lazy' code from `nnmail.el':
(define-widget 'gmm-lazy 'default
"Base widget for recursive datastructures.
Index: gnus-art.el
diff -u gnus/lisp/gnus-art.el:7.301 gnus/lisp/gnus-art.el:7.302
--- gnus-art.el:7.301 Wed Feb 24 23:33:25 2010
+++ gnus-art.el Tue Mar 23 09:23:42 2010
@@ -4192,6 +4192,8 @@
(put-text-property (match-end 0) (point-max)
'face eface)))))))))
+(autoload 'canlock-verify "canlock" nil t) ;; for Emacs 21.
+
(defun article-verify-cancel-lock ()
"Verify Cancel-Lock header."
(interactive)
Index: gnus-util.el
diff -u gnus/lisp/gnus-util.el:7.91 gnus/lisp/gnus-util.el:7.92
--- gnus-util.el:7.91 Wed Jan 13 11:59:43 2010
+++ gnus-util.el Tue Mar 23 09:23:42 2010
@@ -53,10 +53,6 @@
(defvar gnus-original-article-buffer)
(defvar gnus-user-agent)
-(require 'time-date)
-(require 'netrc)
-
-(autoload 'message-fetch-field "message")
(autoload 'gnus-get-buffer-window "gnus-win")
(autoload 'nnheader-narrow-to-headers "nnheader")
(autoload 'nnheader-replace-chars-in-string "nnheader")
@@ -206,8 +202,11 @@
Uses `gnus-extract-address-components'."
(nth 1 (gnus-extract-address-components from)))
+(declare-function message-fetch-field "message" (header &optional not-all))
+
(defun gnus-fetch-field (field)
"Return the value of the header FIELD of current article."
+ (require 'message)
(save-excursion
(save-restriction
(let ((inhibit-point-motion-hooks t))
@@ -228,13 +227,14 @@
(point)))))
(declare-function gnus-find-method-for-group "gnus" (group &optional info))
-(autoload 'gnus-group-name-decode "gnus-group")
+(declare-function gnus-group-name-decode "gnus-group" (string charset))
(declare-function gnus-group-name-charset "gnus-group" (method group))
;; gnus-group requires gnus-int which requires message.
(declare-function message-tokenize-header "message"
(header &optional separator))
(defun gnus-decode-newsgroups (newsgroups group &optional method)
+ (require 'gnus-group)
(let ((method (or method (gnus-find-method-for-group group))))
(mapconcat (lambda (group)
(gnus-group-name-decode group (gnus-group-name-charset
Index: ietf-drums.el
diff -u gnus/lisp/ietf-drums.el:7.20 gnus/lisp/ietf-drums.el:7.21
--- ietf-drums.el:7.20 Wed Jan 13 11:59:43 2010
+++ ietf-drums.el Tue Mar 23 09:23:42 2010
@@ -39,7 +39,6 @@
;;; Code:
(eval-when-compile (require 'cl))
-(require 'time-date)
(require 'mm-util)
(defvar ietf-drums-no-ws-ctl-token "\001-\010\013\014\016-\037\177"
Index: lpath.el
diff -u gnus/lisp/lpath.el:7.58 gnus/lisp/lpath.el:7.59
--- lpath.el:7.58 Mon Mar 15 03:37:02 2010
+++ lpath.el Tue Mar 23 09:23:42 2010
@@ -16,6 +16,16 @@
w3-meta-content-type-charset-regexp))
(when (<= emacs-major-version 22)
+ (defun ecomplete-add-item (type key text))
+ (defun ecomplete-save nil)
+ (defun hashcash-wait-async (&optional buffer))
+ (defun mail-add-payment (&optional arg async))
+ (defun mail-add-payment-async (&optional arg))
+ (defun netrc-get (alist type))
+ (defun netrc-machine (list machine &optional port defaultport))
+ (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
+ ports defaults))
+ (defun netrc-parse (file))
(defun nnkiboze-score-file (a))
(maybe-fbind
'(Info-index
@@ -28,6 +38,7 @@
'(w3m-link-map)))
(when (= emacs-major-version 21)
+ (defun canlock-insert-header (&optional id-for-key id-for-lock password))
(defun split-line (&optional arg))
(maybe-fbind
'(clear-string
@@ -46,10 +57,21 @@
(maybe-bind
'(eudc-protocol
filladapt-mode help-echo-owns-message itimer-list ps-print-color-p
- w3-meta-charset-content-type-regexp
+ smtpmail-default-smtp-server w3-meta-charset-content-type-regexp
w3-meta-content-type-charset-regexp))))
(when (featurep 'xemacs)
+ (defun canlock-insert-header (&optional id-for-key id-for-lock password))
+ (defun ecomplete-add-item (type key text))
+ (defun ecomplete-save nil)
+ (defun hashcash-wait-async (&optional buffer))
+ (defun mail-add-payment (&optional arg async))
+ (defun mail-add-payment-async (&optional arg))
+ (defun netrc-get (alist type))
+ (defun netrc-machine (list machine &optional port defaultport))
+ (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
+ ports defaults))
+ (defun netrc-parse (file))
(defun nnkiboze-score-file (a))
(defun split-line (&optional arg))
(eval-after-load "rmail"
@@ -78,9 +100,9 @@
line-spacing mark-active mouse-selection-click-count
mouse-selection-click-count-buffer ps-print-color-p rmail-default-file
rmail-default-rmail-file rmail-insert-mime-forwarded-message-function
- show-trailing-whitespace tool-bar-mode transient-mark-mode
- url-version w3-meta-charset-content-type-regexp w3m-link-map
- w3-meta-content-type-charset-regexp))
+ show-trailing-whitespace smtpmail-default-smtp-server tool-bar-mode
+ transient-mark-mode url-version w3-meta-charset-content-type-regexp
+ w3m-link-map w3-meta-content-type-charset-regexp))
(when (or (and (= emacs-major-version 21) (= emacs-minor-version 4))
(featurep 'sxemacs))
Index: message.el
diff -u gnus/lisp/message.el:7.292 gnus/lisp/message.el:7.293
--- message.el:7.292 Fri Feb 26 07:12:47 2010
+++ message.el Tue Mar 23 09:23:42 2010
@@ -34,11 +34,12 @@
(eval-when-compile
(require 'cl))
-(require 'hashcash)
-(require 'canlock)
(require 'mailheader)
(require 'gmm-utils)
-(require 'nnheader)
+(require 'mail-utils)
+;; Only for the trivial macros mail-header-from, mail-header-date
+;; mail-header-references, mail-header-subject, mail-header-id
+(eval-when-compile (require 'nnheader))
;; This is apparently necessary even though things are autoloaded.
;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
;; require mailabbrev here.
@@ -48,7 +49,6 @@
(require 'mail-parse)
(require 'mml)
(require 'rfc822)
-(require 'ecomplete)
(autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
@@ -171,6 +171,7 @@
Otherwise, most addresses look like `angles', but they look like
`parens' if `angles' would need quoting and `parens' would not."
+ :version "23.2"
:type '(choice (const :tag "simple" nil)
(const parens)
(const angles)
@@ -436,6 +437,7 @@
(defcustom message-interactive t
"Non-nil means when sending a message wait for and display errors.
nil means let mailer mail back a message to report errors."
+ :version "23.2"
:group 'message-sending
:group 'message-mail
:link '(custom-manual "(message)Sending Variables")
@@ -626,7 +628,7 @@
non-word-constituents
"]\\)+>+\\|[ \t]*[]>|}]\\)+"))))
"*Regexp matching the longest possible citation prefix on a line."
- :version "22.1"
+ :version "23.2"
:group 'message-insertion
:link '(custom-manual "(message)Insertion Variables")
:type 'regexp
@@ -643,8 +645,6 @@
:link '(custom-manual "(message)Canceling News")
:type 'string)
-(defvar smtpmail-default-smtp-server)
-
(defun message-send-mail-function ()
"Return suitable value for the variable `message-send-mail-function'."
(cond ((and (require 'sendmail)
@@ -653,14 +653,13 @@
(executable-find sendmail-program))
'message-send-mail-with-sendmail)
((and (locate-library "smtpmail")
- (require 'smtpmail)
+ (boundp 'smtpmail-default-smtp-server)
smtpmail-default-smtp-server)
'message-smtpmail-send-it)
((locate-library "mailclient")
'message-send-mail-with-mailclient)
(t
- (lambda ()
- (error "Don't know how to send mail. Please customize `message-send-mail-function'")))))
+ (error "Don't know how to send mail. Please customize `message-send-mail-function'"))))
;; Useful to set in site-init.el
(defcustom message-send-mail-function
@@ -824,7 +823,7 @@
"*Envelope-from when sending mail with sendmail.
If this is nil, use `user-mail-address'. If it is the symbol
`header', use the From: header of the message."
- :version "22.1"
+ :version "23.2"
:type '(choice (string :tag "From name")
(const :tag "Use From: header from message" header)
(const :tag "Use `user-mail-address'" nil))
@@ -1001,6 +1000,7 @@
"*Prefix inserted on the lines of yanked messages.
Fix `message-cite-prefix-regexp' if it is set to an abnormal value.
See also `message-yank-cited-prefix' and `message-yank-empty-prefix'."
+ :version "23.2"
:type 'string
:link '(custom-manual "(message)Insertion Variables")
:group 'message-insertion)
@@ -1025,6 +1025,7 @@
(defcustom message-indentation-spaces 3
"*Number of spaces to insert at the beginning of each cited line.
Used by `message-yank-original' via `message-yank-cite'."
+ :version "23.2"
:group 'message-insertion
:link '(custom-manual "(message)Insertion Variables")
:type 'integer)
@@ -1056,6 +1057,7 @@
If t, the `message-signature-file' file will be inserted instead.
If a function, the result from the function will be used instead.
If a form, the result from the form will be used instead."
+ :version "23.2"
:type 'sexp
:link '(custom-manual "(message)Insertion Variables")
:group 'message-insertion)
@@ -1066,6 +1068,7 @@
If nil, don't insert a signature.
If a path is specified, the value of `message-signature-directory' is ignored,
even if set."
+ :version "23.2"
:type '(choice file (const :tags "None" nil))
:link '(custom-manual "(message)Insertion Variables")
:group 'message-insertion)
@@ -1141,6 +1144,7 @@
"*A string containing header lines to be inserted in outgoing messages.
It is inserted before you edit the message, so you can edit or delete
these lines."
+ :version "23.2"
:group 'message-headers
:link '(custom-manual "(message)Message Headers")
:type 'message-header-lines)
@@ -1244,7 +1248,7 @@
:type '(repeat function))
(defcustom message-auto-save-directory
- (file-name-as-directory (nnheader-concat message-directory "drafts"))
+ (file-name-as-directory (expand-file-name "drafts" message-directory))
"*Directory where Message auto-saves buffers if Gnus isn't running.
If nil, Message won't auto-save."
:group 'message-buffers
@@ -1920,6 +1924,8 @@
(setq paren nil))))
(nreverse elems)))))
+(autoload 'nnheader-insert-file-contents "nnheader")
+
(defun message-mail-file-mbox-p (file)
"Say whether FILE looks like a Unix mbox file."
(when (and (file-exists-p file)
@@ -2813,6 +2819,8 @@
(inhibit-read-only t))
(remove-text-properties begin end message-forbidden-properties))))
+(autoload 'ecomplete-setup "ecomplete") ;; for Emacs <23.
+
;;;###autoload
(define-derived-mode message-mode text-mode "Message"
"Major mode for editing mail and news to be sent.
@@ -3372,8 +3380,8 @@
;; if message-signature-file contains a path.
(not (file-name-directory
message-signature-file)))
- (nnheader-concat message-signature-directory
- message-signature-file)
+ (expand-file-name message-signature-file
+ message-signature-directory)
message-signature-file))
(file-exists-p signature-file))))
(when signature
@@ -4376,6 +4384,8 @@
(erase-buffer)))
(kill-buffer tembuf))))
+(declare-function hashcash-wait-async "hashcash" (&optional buffer))
+
(defun message-send-mail (&optional arg)
(require 'mail-utils)
(let* ((tembuf (message-generate-new-buffer-clone-locals " message temp"))
@@ -4383,14 +4393,26 @@
(news (message-news-p))
(mailbuf (current-buffer))
(message-this-is-mail t)
+ ;; gnus-setup-posting-charset is autoloaded in mml.el (FIXME
+ ;; maybe it should not be), which this file requires. Hence
+ ;; the fboundp test is always true. Loading it from gnus-msg
+ ;; loads many Gnus files (Bug#5642). If
+ ;; gnus-group-posting-charset-alist hasn't been customized,
+ ;; this is just going to return nil anyway. FIXME it would
+ ;; be good to improve this further, because even if g-g-p-c-a
+ ;; has been customized, that is likely to just be for news.
+ ;; Eg either move the definition from gnus-msg, or separate out
+ ;; the mail and news parts.
(message-posting-charset
- (if (fboundp 'gnus-setup-posting-charset)
+ (if (and (fboundp 'gnus-setup-posting-charset)
+ (boundp 'gnus-group-posting-charset-alist))
(gnus-setup-posting-charset nil)
message-posting-charset))
(headers message-required-mail-headers))
(when (and message-generate-hashcash
(not (eq message-generate-hashcash 'opportunistic)))
(message "Generating hashcash...")
+ (require 'hashcash)
;; Wait for calculations already started to finish...
(hashcash-wait-async)
;; ...and do calculations not already done. mail-add-payment
@@ -4512,6 +4534,7 @@
(defun message-send-mail-with-sendmail ()
"Send off the prepared buffer with sendmail."
+ (require 'sendmail)
(let ((errbuf (if message-interactive
(message-generate-new-buffer-clone-locals
" sendmail errors")
@@ -4560,8 +4583,8 @@
;; since some systems have broken sendmails.
;; But some systems are more broken with -f, so
;; we'll let users override this.
- (if (null message-sendmail-f-is-evil)
- (list "-f" (message-sendmail-envelope-from)))
+ (and (null message-sendmail-f-is-evil)
+ (list "-f" (message-sendmail-envelope-from)))
;; These mean "report errors by mail"
;; and "deliver in background".
(if (null message-interactive) '("-oem" "-odb"))
@@ -4675,10 +4698,14 @@
(prin1-to-string (recent-keys))
(prin1-to-string (garbage-collect))))))
+(defvar canlock-password)
+(defvar canlock-password-for-verify)
+
(defun message-canlock-password ()
"The password used by message for cancel locks.
This is the value of `canlock-password', if that option is non-nil.
Otherwise, generate and save a value for `canlock-password' first."
+ (require 'canlock)
(unless canlock-password
(customize-save-variable 'canlock-password (message-canlock-generate))
(setq canlock-password-for-verify canlock-password))
@@ -4689,7 +4716,12 @@
(message-canlock-password)
(canlock-insert-header)))
+(autoload 'nnheader-get-report "nnheader")
+
+(declare-function gnus-setup-posting-charset "gnus-msg" (group))
+
(defun message-send-news (&optional arg)
+ (require 'gnus-msg)
(let* ((tembuf (message-generate-new-buffer-clone-locals " *message temp*"))
(case-fold-search nil)
(method (if (functionp message-post-method)
@@ -5428,7 +5460,7 @@
(defun message-make-references ()
"Return the References header for this message."
(when message-reply-headers
- (let ((message-id (mail-header-message-id message-reply-headers))
+ (let ((message-id (mail-header-id message-reply-headers))
(references (mail-header-references message-reply-headers)))
(if (or references message-id)
(concat (or references "") (and references " ")
@@ -5440,7 +5472,7 @@
(when message-reply-headers
(let ((from (mail-header-from message-reply-headers))
(date (mail-header-date message-reply-headers))
- (msg-id (mail-header-message-id message-reply-headers)))
+ (msg-id (mail-header-id message-reply-headers)))
(when from
(let ((name (mail-extract-address-components from)))
(concat
@@ -7965,7 +7997,11 @@
(not result)
result)))
+(declare-function ecomplete-add-item "ecomplete" (type key text))
+(declare-function ecomplete-save "ecomplete" ())
+
(defun message-put-addresses-in-ecomplete ()
+ (require 'ecomplete)
(dolist (header '("to" "cc" "from" "reply-to"))
(let ((value (message-field-value header)))
(dolist (string (mail-header-parse-addresses value 'raw))
@@ -7976,6 +8012,8 @@
string))))
(ecomplete-save))
+(autoload 'ecomplete-display-matches "ecomplete")
+
(defun message-display-abbrev (&optional choose)
"Display the next possible abbrev for the text before point."
(interactive (list t))
Index: mm-decode.el
diff -u gnus/lisp/mm-decode.el:7.74 gnus/lisp/mm-decode.el:7.75
--- mm-decode.el:7.74 Wed Jan 13 11:59:44 2010
+++ mm-decode.el Tue Mar 23 09:23:42 2010
@@ -29,12 +29,14 @@
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(require 'mail-parse)
-(require 'mailcap)
(require 'mm-bodies)
-(require 'gnus-util)
(eval-when-compile (require 'cl)
(require 'term))
+(autoload 'gnus-map-function "gnus-util")
+(autoload 'gnus-replace-in-string "gnus-util")
+(autoload 'gnus-read-shell-command "gnus-util")
+
(autoload 'mm-inline-partial "mm-partial")
(autoload 'mm-inline-external-body "mm-extern")
(autoload 'mm-extern-cache-contents "mm-extern")
@@ -550,6 +552,8 @@
(message "Destroying external MIME viewers")
(mm-destroy-parts mm-postponed-undisplay-list)))
+(autoload 'message-fetch-field "message")
+
(defun mm-dissect-buffer (&optional no-strict-mime loose-mime from)
"Dissect the current buffer and return a list of MIME handles."
(save-excursion
@@ -688,6 +692,9 @@
(goto-char (point-max)))
(mapcar 'mm-display-parts handle))))
+(autoload 'mailcap-parse-mailcaps "mailcap")
+(autoload 'mailcap-mime-info "mailcap")
+
(defun mm-display-part (handle &optional no-default)
"Display the MIME part represented by HANDLE.
Returns nil if the part is removed; inline if displayed inline;
@@ -747,6 +754,7 @@
handle 'mailcap-save-binary-file)))))))))
(declare-function gnus-configure-windows "gnus-win" (setting &optional force))
+(defvar mailcap-mime-extensions) ; mailcap-mime-info autoloads
(defun mm-display-external (handle method)
"Display HANDLE using METHOD."
Index: mm-encode.el
diff -u gnus/lisp/mm-encode.el:7.21 gnus/lisp/mm-encode.el:7.22
--- mm-encode.el:7.21 Wed Jan 13 11:59:44 2010
+++ mm-encode.el Tue Mar 23 09:23:42 2010
@@ -26,7 +26,7 @@
(eval-when-compile (require 'cl))
(require 'mail-parse)
-(require 'mailcap)
+(autoload 'mailcap-extension-to-mime "mailcap")
(autoload 'mm-body-7-or-8 "mm-bodies")
(autoload 'mm-long-lines-p "mm-bodies")
Index: mml-sec.el
diff -u gnus/lisp/mml-sec.el:7.26 gnus/lisp/mml-sec.el:7.27
--- mml-sec.el:7.26 Wed Jan 13 11:59:44 2010
+++ mml-sec.el Tue Mar 23 09:23:42 2010
@@ -26,10 +26,6 @@
(eval-when-compile (require 'cl))
-(if (locate-library "password-cache")
- (require 'password-cache)
- (require 'password))
-
(autoload 'mml2015-sign "mml2015")
(autoload 'mml2015-encrypt "mml2015")
(autoload 'mml1991-sign "mml1991")
@@ -109,12 +105,18 @@
:group 'message
:type 'boolean)
-(defcustom mml-secure-cache-passphrase password-cache
+(defcustom mml-secure-cache-passphrase
+ (if (boundp 'password-cache)
+ password-cache
+ t)
"If t, cache passphrase."
:group 'message
:type 'boolean)
-(defcustom mml-secure-passphrase-cache-expiry password-cache-expiry
+(defcustom mml-secure-passphrase-cache-expiry
+ (if (boundp 'password-cache-expiry)
+ password-cache-expiry
+ 16)
"How many seconds the passphrase is cached.
Whether the passphrase is cached at all is controlled by
`mml-secure-cache-passphrase'."
Index: mml.el
diff -u gnus/lisp/mml.el:7.81 gnus/lisp/mml.el:7.82
--- mml.el:7.81 Wed Mar 17 04:52:56 2010
+++ mml.el Tue Mar 23 09:23:42 2010
@@ -35,7 +35,7 @@
(eval-when-compile (require 'cl))
(autoload 'message-make-message-id "message")
-(autoload 'gnus-setup-posting-charset "gnus-msg")
+(declare-function gnus-setup-posting-charset "gnus-msg" (group))
(autoload 'gnus-make-local-hook "gnus-util")
(autoload 'message-fetch-field "message")
(autoload 'message-mark-active-p "message")
@@ -1173,7 +1173,11 @@
(error "Permission denied: %s" file))
file))
+(declare-function mailcap-parse-mimetypes "mailcap" (&optional path force))
+(declare-function mailcap-mime-types "mailcap" ())
+
(defun mml-minibuffer-read-type (name &optional default)
+ (require 'mailcap)
(mailcap-parse-mimetypes)
(let* ((default (or default
(mm-default-file-encoding name)
@@ -1445,6 +1449,7 @@
(setq mml-preview-buffer (generate-new-buffer
(concat (if raw "*Raw MIME preview of "
"*MIME preview of ") (buffer-name))))
+ (require 'gnus-msg) ; for gnus-setup-posting-charset
(save-excursion
(let* ((buf (current-buffer))
(message-options message-options)
Index: mml1991.el
diff -u gnus/lisp/mml1991.el:7.34 gnus/lisp/mml1991.el:7.35
--- mml1991.el:7.34 Wed Jan 13 11:59:44 2010
+++ mml1991.el Tue Mar 23 09:23:42 2010
@@ -28,7 +28,11 @@
;; For Emacs < 22.2.
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
+
+ (if (locate-library "password-cache")
+ (require 'password-cache)
+ (require 'password)))
(eval-when-compile
(require 'cl)
@@ -329,7 +333,6 @@
;; epg wrapper
(defvar epg-user-id-alist)
-(defvar password-cache-expiry)
(autoload 'epg-make-context "epg")
(autoload 'epg-passphrase-callback-function "epg")
Index: mml2015.el
diff -u gnus/lisp/mml2015.el:7.60 gnus/lisp/mml2015.el:7.61
--- mml2015.el:7.60 Wed Jan 13 11:59:44 2010
+++ mml2015.el Tue Mar 23 09:23:42 2010
@@ -30,7 +30,11 @@
;; For Emacs < 22.2.
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
+
+ (if (locate-library "password-cache")
+ (require 'password-cache)
+ (require 'password)))
(eval-when-compile (require 'cl))
(require 'mm-decode)
@@ -986,8 +990,6 @@
(autoload 'epg-expand-group "epg-config")
(autoload 'epa-select-keys "epa")
-(defvar password-cache-expiry)
-
(defvar mml2015-epg-secret-key-id-list nil)
(defun mml2015-epg-passphrase-callback (context key-id ignore)
Index: nneething.el
diff -u gnus/lisp/nneething.el:7.16 gnus/lisp/nneething.el:7.17
--- nneething.el:7.16 Wed Jan 13 11:59:44 2010
+++ nneething.el Tue Mar 23 09:23:42 2010
@@ -28,6 +28,7 @@
(eval-when-compile (require 'cl))
+(require 'mailcap)
(require 'nnheader)
(require 'nnmail)
(require 'nnoo)
Index: nnheader.el
diff -u gnus/lisp/nnheader.el:7.39 gnus/lisp/nnheader.el:7.40
--- nnheader.el:7.39 Wed Jan 13 11:59:44 2010
+++ nnheader.el Tue Mar 23 09:23:42 2010
@@ -27,6 +27,8 @@
;;; Code:
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile (require 'cl))
(defvar nnmail-extra-headers)
@@ -121,7 +123,6 @@
(autoload 'nnmail-message-id "nnmail")
(autoload 'mail-position-on-field "sendmail")
-(autoload 'message-remove-header "message")
(autoload 'gnus-buffer-live-p "gnus-util")
;;; Header access macros.
@@ -662,8 +663,12 @@
;; without inserting extra newline.
(fill-region-as-paragraph begin (1+ (point))))))
+(declare-function message-remove-header "message"
+ (header &optional is-regexp first reverse))
+
(defun nnheader-replace-header (header new-value)
"Remove HEADER and insert the NEW-VALUE."
+ (require 'message)
(save-excursion
(save-restriction
(nnheader-narrow-to-headers)
Index: nnimap.el
diff -u gnus/lisp/nnimap.el:7.63 gnus/lisp/nnimap.el:7.64
--- nnimap.el:7.63 Mon Mar 22 11:58:48 2010
+++ nnimap.el Tue Mar 23 09:23:42 2010
@@ -59,6 +59,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'imap)
(require 'nnoo)
(require 'nnmail)
@@ -810,12 +814,17 @@
(nnheader-nov-delete-outside-range low high))))
'nov)))
+(declare-function netrc-parse "netrc" (file))
+(declare-function netrc-machine-user-or-password "netrc"
+ (mode authinfo-file-or-list machines ports defaults))
+
(defun nnimap-open-connection (server)
;; Note: `nnimap-open-server' that calls this function binds
;; `imap-logout-timeout' to `nnimap-logout-timeout'.
(if (not (imap-open nnimap-address nnimap-server-port nnimap-stream
nnimap-authenticator nnimap-server-buffer))
(nnheader-report 'nnimap "Can't open connection to server %s" server)
+ (require 'netrc)
(unless (or (imap-capability 'IMAP4 nnimap-server-buffer)
(imap-capability 'IMAP4rev1 nnimap-server-buffer))
(imap-close nnimap-server-buffer)
@@ -826,7 +835,7 @@
(port (if nnimap-server-port
(int-to-string nnimap-server-port)
"imap"))
- (auth-info
+ (auth-info
(auth-source-user-or-password '("login" "password") server port))
(auth-user (nth 0 auth-info))
(auth-passwd (nth 1 auth-info))
Index: nntp.el
diff -u gnus/lisp/nntp.el:7.54 gnus/lisp/nntp.el:7.55
--- nntp.el:7.54 Wed Jan 13 11:59:44 2010
+++ nntp.el Tue Mar 23 09:23:42 2010
@@ -26,6 +26,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'nnheader)
(require 'nnoo)
(require 'gnus-util)
@@ -1168,6 +1172,11 @@
reading."
(nntp-send-command "^.*\n" "MODE READER"))
+(declare-function netrc-parse "netrc" (file))
+(declare-function netrc-machine "netrc"
+ (list machine &optional port defaultport))
+(declare-function netrc-get "netrc" (alist type))
+
(defun nntp-send-authinfo (&optional send-if-force)
"Send the AUTHINFO to the nntp server.
It will look in the \"~/.authinfo\" file for matching entries. If
@@ -1176,10 +1185,11 @@
If SEND-IF-FORCE, only send authinfo to the server if the
.authinfo file has the FORCE token."
+ (require 'netrc)
(let* ((list (netrc-parse nntp-authinfo-file))
(alist (netrc-machine list nntp-address "nntp"))
(force (or (netrc-get alist "force") nntp-authinfo-force))
- (auth-info
+ (auth-info
(auth-source-user-or-password '("login" "password") nntp-address "nntp"))
(auth-user (nth 0 auth-info))
(auth-passwd (nth 1 auth-info))
Index: password-cache.el
diff -u gnus/lisp/password-cache.el:7.6 gnus/lisp/password-cache.el:7.7
--- password-cache.el:7.6 Wed Jan 13 11:59:44 2010
+++ password-cache.el Tue Mar 23 09:23:42 2010
@@ -1,7 +1,7 @@
;;; password-cache.el --- Read passwords, possibly using a password cache.
-;; Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+;; 2010 Free Software Foundation, Inc.
;; Author: Simon Josefsson <[email protected]>
;; Created: 2003-12-21
@@ -51,11 +51,15 @@
;;; Code:
+;; Options are autoloaded since they are used by eg mml-sec.el.
+
+;;;###autoload
(defcustom password-cache t
"Whether to cache passwords."
:group 'password
:type 'boolean)
+;;;###autoload
(defcustom password-cache-expiry 16
"How many seconds passwords are cached, or nil to disable expiring.
Whether passwords are cached at all is controlled by `password-cache'."
Index: pop3.el
diff -u gnus/lisp/pop3.el:7.41 gnus/lisp/pop3.el:7.42
--- pop3.el:7.41 Sat Mar 20 17:19:52 2010
+++ pop3.el Tue Mar 23 09:23:42 2010
@@ -486,7 +486,8 @@
(mapcar #'(lambda (s) (let ((split (split-string s " ")))
(cons (string-to-number (nth 0 split))
(string-to-number (nth 1 split)))))
- (split-string (buffer-substring start end) "\r\n" t)))))))
+ (delete "" (split-string (buffer-substring start end)
+ "\r\n"))))))))
(defun pop3-retr (process msg crashbuf)
"Retrieve message-id MSG to buffer CRASHBUF."
Index: rfc2047.el
diff -u gnus/lisp/rfc2047.el:7.78 gnus/lisp/rfc2047.el:7.79
--- rfc2047.el:7.78 Wed Jan 13 11:59:44 2010
+++ rfc2047.el Tue Mar 23 09:23:42 2010
@@ -31,7 +31,6 @@
(require 'cl))
(defvar message-posting-charset)
-(require 'qp)
(require 'mm-util)
(require 'ietf-drums)
;; Fixme: Avoid this (used for mail-parse-charset) mm dependence on gnus.
@@ -827,6 +826,8 @@
"Base64-encode the header contained in STRING."
(base64-encode-string string t))
+(autoload 'quoted-printable-encode-region "qp")
+
(defun rfc2047-q-encode-string (string)
"Quoted-printable-encode the header in STRING."
(mm-with-unibyte-buffer
@@ -929,6 +930,8 @@
'raw-text
cs)))
+(autoload 'quoted-printable-decode-string "qp")
+
(defun rfc2047-decode-encoded-words (words)
"Decode successive encoded-words in WORDS and return a decoded string.
Each element of WORDS looks like (CHARSET ENCODING ENCODED-TEXT
Index: sieve-mode.el
diff -u gnus/lisp/sieve-mode.el:7.16 gnus/lisp/sieve-mode.el:7.17
--- sieve-mode.el:7.16 Wed Jan 13 11:59:44 2010
+++ sieve-mode.el Tue Mar 23 09:23:42 2010
@@ -1,7 +1,7 @@
;;; sieve-mode.el --- Sieve code editing commands for Emacs
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-;; Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+;; 2010 Free Software Foundation, Inc.
;; Author: Simon Josefsson <[email protected]>
@@ -49,7 +49,6 @@
(autoload 'sieve-manage "sieve")
(autoload 'sieve-upload "sieve")
-(require 'easymenu)
(eval-when-compile
(require 'font-lock))
@@ -186,6 +185,7 @@
"Menubar used in sieve mode.")
;; Code for Sieve editing mode.
+(autoload 'easy-menu-add-item "easymenu")
;;;###autoload
(define-derived-mode sieve-mode c-mode "Sieve"
Index: spam-stat.el
diff -u gnus/lisp/spam-stat.el:7.36 gnus/lisp/spam-stat.el:7.37
--- spam-stat.el:7.36 Wed Jan 13 11:59:44 2010
+++ spam-stat.el Tue Mar 23 09:23:42 2010
@@ -1,6 +1,7 @@
;;; spam-stat.el --- detecting spam based on statistics
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+;; 2010 Free Software Foundation, Inc.
;; Author: Alex Schroeder <[email protected]>
;; Keywords: network
@@ -557,6 +558,8 @@
(when (re-search-forward "^Xref:.*\n" nil t)
(delete-region (match-beginning 0) (match-end 0)))))
+(autoload 'time-to-number-of-days "time-date")
+
(defun spam-stat-process-directory (dir func)
"Process all the regular files in directory DIR using function FUNC."
(let* ((files (directory-files dir t "^[^.]"))