Synch with Gnus.
[elisp/gnus.git-] / lisp / gnus-ems.el
index c898bc9..3a2fedc 100644 (file)
 
 ;;; Function aliases later to be redefined for XEmacs usage.
 
-(eval-and-compile
-  (defvar gnus-xemacs (featurep 'xemacs)
-    "Non-nil if running under XEmacs."))
-
 (defvar gnus-mouse-2 [mouse-2])
 (defvar gnus-down-mouse-3 [down-mouse-3])
 (defvar gnus-down-mouse-2 [down-mouse-2])
 (defvar gnus-widget-button-keymap nil)
 (defvar gnus-mode-line-modified
-  (if (or gnus-xemacs
+  (if (or (featurep 'xemacs)
          (< emacs-major-version 20))
       '("--**-" . "-----")
     '("**" "--")))
   (autoload 'gnus-xmas-redefine "gnus-xmas")
   (autoload 'appt-select-lowest-window "appt"))
 
-(or (fboundp 'mail-file-babyl-p)
-    (fset 'mail-file-babyl-p 'rmail-file-p))
-
-(when (and (not (featurep 'xemacs)) (>= emacs-major-version 21))
+(if (featurep 'xemacs)
+    (autoload 'gnus-smiley-display "smiley")
   (autoload 'gnus-smiley-display "smiley-ems")) ; override XEmacs version
 
+(defun gnus-kill-all-overlays ()
+  "Delete all overlays in the current buffer."
+  (let* ((overlayss (overlay-lists))
+        (buffer-read-only nil)
+        (overlays (delq nil (nconc (car overlayss) (cdr overlayss)))))
+    (while overlays
+      (delete-overlay (pop overlays)))))
+
 ;;; Mule functions.
 
 (eval-and-compile
-  (if gnus-xemacs
+  (if (featurep 'xemacs)
       (gnus-xmas-define)
     (defvar gnus-mouse-face-prop 'mouse-face
       "Property used for highlighting mouse regions.")))
@@ -87,7 +89,7 @@
 
 (defun gnus-ems-redefine ()
   (cond
-   (gnus-xemacs
+   ((featurep 'xemacs)
     (gnus-xmas-redefine))
 
    ((featurep 'mule)
     (defvar gnus-summary-display-table nil
       "Display table used in summary mode buffers.")
 
+    (defalias 'gnus-summary-set-display-table (lambda ()))
+
     (if (fboundp 'truncate-string-to-width)
        (fset 'gnus-truncate-string 'truncate-string-to-width)
       (fset 'gnus-truncate-string 'truncate-string))
   "Length of the ring used for `gnus-article-xface-ring-internal'.")
 
 (defvar gnus-article-compface-xbm
-  (when (and (not (featurep 'xemacs)) (>= emacs-major-version 21))
-    (eq 0 (string-match "#define" (shell-command-to-string "uncompface -X"))))
+  (condition-case ()
+      (eq 0 (string-match "#define"
+                         (shell-command-to-string "uncompface -X")))
+    (error nil))
   "Non-nil means the compface program supports the -X option.
 That produces XBM output.")