From c7641e3c89bbd310dea7d81da8599823b821057e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 22 May 2013 22:05:27 -0700 Subject: [PATCH] Silence some gnus compilation warnings * gnus/mm-decode.el: No need to load term when compiling. (term-mode, term-char-mode): Declare. * gnus/mm-util.el: No need to load jka-compr when compiling. (jka-compr-acceptable-retval-list, jka-compr-make-temp-name): Declare. * gnus/nnmaildir.el: Require is automatically eval-and-compile. (nnmail): Require at run-time too. * gnus/registry.el (registry-size): Move definition before use. --- lisp/gnus/ChangeLog | 13 +++++++++++++ lisp/gnus/mm-decode.el | 5 +++-- lisp/gnus/mm-util.el | 4 ++-- lisp/gnus/nnmaildir.el | 20 ++++++++++---------- lisp/gnus/registry.el | 10 +++++----- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6ec0cf56cc0..121febb0755 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,16 @@ +2013-05-23 Glenn Morris + + * mm-decode.el: No need to load term when compiling. + (term-mode, term-char-mode): Declare. + + * mm-util.el: No need to load jka-compr when compiling. + (jka-compr-acceptable-retval-list, jka-compr-make-temp-name): Declare. + + * nnmaildir.el: Require is automatically eval-and-compile. + (nnmail): Require at run-time too. + + * registry.el (registry-size): Move definition before use. + 2013-05-22 Daiki Ueno * mml2015.el (mml2015-epg-sign): Make sure to insert newline after the diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 04f325633ba..b025f7cc601 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -29,8 +29,7 @@ (require 'mail-parse) (require 'mm-bodies) -(eval-when-compile (require 'cl) - (require 'term)) +(eval-when-compile (require 'cl)) (autoload 'gnus-map-function "gnus-util") (autoload 'gnus-replace-in-string "gnus-util") @@ -813,6 +812,8 @@ external if displayed external." (declare-function gnus-configure-windows "gnus-win" (setting &optional force)) (defvar mailcap-mime-extensions) ; mailcap-mime-info autoloads +(declare-function term-mode "term" ()) +(declare-function term-char-mode "term" ()) (defun mm-display-external (handle method) "Display HANDLE using METHOD." diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index a49d308b67c..209c2949ea9 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -1508,8 +1508,8 @@ To make this function work with XEmacs, the APEL package is required." (fboundp 'coding-system-to-mime-charset))) (coding-system-to-mime-charset coding-system))))) -(eval-when-compile - (require 'jka-compr)) +(defvar jka-compr-acceptable-retval-list) +(declare-function jka-compr-make-temp-name "jka-compr" (&optional local)) (defun mm-decompress-buffer (filename &optional inplace force) "Decompress buffer's contents, depending on jka-compr. diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 74a693a9c61..7d33e511baa 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -63,17 +63,17 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) -(eval-and-compile - (require 'nnheader) - (require 'gnus) - (require 'gnus-util) - (require 'gnus-range) - (require 'gnus-start) - (require 'gnus-int) - (require 'message)) +(require 'nnheader) +(require 'gnus) +(require 'gnus-util) +(require 'gnus-range) +(require 'gnus-start) +(require 'gnus-int) +(require 'message) +(require 'nnmail) + (eval-when-compile - (require 'cl) - (require 'nnmail)) + (require 'cl)) (defconst nnmaildir-version "Gnus") diff --git a/lisp/gnus/registry.el b/lisp/gnus/registry.el index 9830fc30c98..79f07812b2d 100644 --- a/lisp/gnus/registry.el +++ b/lisp/gnus/registry.el @@ -249,6 +249,11 @@ With assert non-nil, errors out if the key does not exist already." (remhash key data))) keys)) + (defmethod registry-size ((db registry-db)) + "Returns the size of the registry-db object THIS. +This is the key count of the :data slot." + (hash-table-count (oref db :data))) + (defmethod registry-full ((db registry-db)) "Checks if registry-db THIS is full." (>= (registry-size db) @@ -297,11 +302,6 @@ Errors out if the key exists already." (registry-lookup-secondary-value db tr val value-keys)))) (oref db :data)))))) - (defmethod registry-size ((db registry-db)) - "Returns the size of the registry-db object THIS. -This is the key count of the :data slot." - (hash-table-count (oref db :data))) - (defmethod registry-prune ((db registry-db) &optional sortfun) "Prunes the registry-db object THIS. Removes only entries without the :precious keys if it can, -- 2.39.2