(gnus-agent-make-mode-line-string): Make it compatible
authorReiner Steib <Reiner.Steib@gmx.de>
Sat, 28 Oct 2006 09:20:34 +0000 (09:20 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Sat, 28 Oct 2006 09:20:34 +0000 (09:20 +0000)
with Emacs 21 and XEmacs.

lisp/ChangeLog
lisp/gnus-agent.el

index 47a1809..958ff13 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-28  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * gnus-agent.el (gnus-agent-make-mode-line-string): Make it compatible
+       with Emacs 21 and XEmacs.
+
 2006-10-27  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-parse-address): new function for better parsing,
index 8940405..5224b6a 100644 (file)
@@ -601,7 +601,17 @@ manipulated as follows:
           (fboundp 'make-mode-line-mouse-map))
       (propertize string 'local-map
                  (make-mode-line-mouse-map mouse-button mouse-func)
-                 'mouse-face 'mode-line-highlight)
+                 'mouse-face
+                 (cond ((and (featurep 'xemacs)
+                             ;; XEmacs' `facep' only checks for a face
+                             ;; object, not for a face name, so it's useless
+                             ;; to check with `facep'.
+                             (find-face 'modeline))
+                        'modeline)
+                       ((facep 'mode-line-highlight) ;; Emacs 22
+                        'mode-line-highlight)
+                       ((facep 'mode-line) ;; Emacs 21
+                        'mode-line)) )
     string))
 
 (defun gnus-agent-toggle-plugged (set-to)