Give a better error message in the "go offline" case.
[gnus] / lisp / gnus-xmas.el
index ecc1576..1e5fafb 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-xmas.el --- Gnus functions for XEmacs
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;;   2005, 2006, 2008 Free Software Foundation, Inc.
+;;   2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -341,7 +341,7 @@ call it with the value of the `gnus-data' text property."
 (defun gnus-xmas-read-event-char (&optional prompt)
   "Get the next event."
   (when prompt
-    (message "%s" prompt))
+    (display-message 'no-log (format "%s" prompt)))
   (let ((event (next-command-event)))
     (sit-for 0)
     ;; We junk all non-key events.  Is this naughty?
@@ -916,8 +916,6 @@ XEmacs compatibility workaround."
                  (list
                   (cons 'x
                         (expand-file-name pixmap gnus-xmas-glyph-directory))
-                  (cons 'mswindows
-                        (expand-file-name pixmap gnus-xmas-glyph-directory))
                   (cons 'tty substring)))))
      (setq gnus-group-icon-cache
           (cons (cons pixmap glyph) gnus-group-icon-cache))
@@ -935,9 +933,12 @@ XEmacs compatibility workaround."
        (featurep (if (eq type 'pbm) 'xbm type))))
 
 (defun gnus-xmas-create-image (file &optional type data-p &rest props)
-  (let ((type (if type
-                 (symbol-name type)
-               (car (last (split-string file "[.]")))))
+  (let ((type (cond
+              (type
+               (symbol-name type))
+              ((and (not data-p)
+                    (string-match "[.]" file))
+               (car (last (split-string file "[.]"))))))
        (face (plist-get props :face))
        glyph)
     (when (equal type "pbm")
@@ -959,8 +960,9 @@ XEmacs compatibility workaround."
                (insert-file-contents-literally file))
              (make-glyph
               (vector
-               (or (intern type)
-                   (mm-image-type-from-buffer))
+               (if type
+                   (intern type)
+                 (mm-image-type-from-buffer))
                :data (buffer-string))))))
     (when face
       (set-glyph-face glyph face))
@@ -1002,5 +1004,4 @@ Warning: Don't insert text immediately after the image."
 
 (provide 'gnus-xmas)
 
-;;; arch-tag: 4e84de3f-ea0a-4ee3-bfeb-e03d46fcacef
 ;;; gnus-xmas.el ends here