]> git.eshelyaron.com Git - emacs.git/commitdiff
Silence compilation of mm-util.el.
authorGlenn Morris <rgm@gnu.org>
Mon, 1 Nov 2010 06:39:01 +0000 (23:39 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 1 Nov 2010 06:39:01 +0000 (23:39 -0700)
* lisp/gnus/mm-util.el (gnus-completing-read): Autoload.
(mm-read-coding-system): Simplify Emacs definition.

lisp/gnus/ChangeLog
lisp/gnus/mm-util.el

index 554bde2e2b49624ba33c9533e3e47071d2847ed4..4ebf11251b9b5c044ee0beb549405ab17a93ec86 100644 (file)
@@ -5,6 +5,9 @@
 
 2010-11-01  Glenn Morris  <rgm@gnu.org>
 
+       * mm-util.el (gnus-completing-read): Autoload.
+       (mm-read-coding-system): Simplify Emacs definition.
+
        * nnmail.el (gnus-activate-group):
        * nnimap.el (gnutls-negotiate):
        * nntp.el (netrc-parse): Fix declarations.
index b06615cb61fa605c63af8444e0bb4e0f9bbdf2ee..67b41e0cb3a46c5c28c617bccbcc2e1ee0edd8c4 100644 (file)
     (require 'timer)))
 
 (defvar mm-mime-mule-charset-alist )
+;; Note this is not presently used on Emacs >= 23, which is good,
+;; since it means standalone message-mode (which requires mml and
+;; hence mml-util) does not load gnus-util.
+(autoload 'gnus-completing-read "gnus-util")
 
 ;; Emulate functions that are not available in every (X)Emacs version.
 ;; The name of a function is prefixed with mm-, like `mm-char-int' for
@@ -263,18 +267,19 @@ to the contents of the accessible portion of the buffer."
 ;; Actually, there should be an `mm-coding-system-mime-charset'.
 (eval-and-compile
   (defalias 'mm-read-coding-system
-    (cond
-     ((fboundp 'read-coding-system)
-      (if (and (featurep 'xemacs)
-              (<= (string-to-number emacs-version) 21.1))
-         (lambda (prompt &optional default-coding-system)
-           (read-coding-system prompt))
-       'read-coding-system))
-     (t (lambda (prompt &optional default-coding-system)
-         "Prompt the user for a coding system."
-         (gnus-completing-read
-          prompt (mapcar (lambda (s) (symbol-name (car s)))
-                         mm-mime-mule-charset-alist)))))))
+    (if (featurep 'emacs) 'read-coding-system
+      (cond
+       ((fboundp 'read-coding-system)
+       (if (and (featurep 'xemacs)
+                (<= (string-to-number emacs-version) 21.1))
+           (lambda (prompt &optional default-coding-system)
+             (read-coding-system prompt))
+         'read-coding-system))
+       (t (lambda (prompt &optional default-coding-system)
+           "Prompt the user for a coding system."
+           (gnus-completing-read
+            prompt (mapcar (lambda (s) (symbol-name (car s)))
+                           mm-mime-mule-charset-alist))))))))
 
 (defvar mm-coding-system-list nil)
 (defun mm-get-coding-system-list ()