*** empty log message ***
[gnus] / lisp / gnus-xmas.el
index 5e3dc56..8801f03 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-xmas.el --- Gnus functions for XEmacs
-;; Copyright (C) 1995,96 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
 ;; Keywords: news
@@ -381,7 +381,14 @@ call it with the value of the `gnus-data' text property."
   (unless (face-differs-from-default-p 'underline)
     (funcall (intern "set-face-underline-p") 'underline t))
 
-  (fset 'gnus-characterp 'characterp)
+  (cond
+   ((fboundp 'char-or-char-int-p)
+    ;; Handle both types of marks for XEmacs-20.x.
+    (fset 'gnus-characterp 'char-or-char-int-p))
+   ;; V19 of XEmacs, probably.
+   (t
+    (fset 'gnus-characterp 'characterp)))
+
   (fset 'gnus-make-overlay 'make-extent)
   (fset 'gnus-overlay-put 'set-extent-property)
   (fset 'gnus-move-overlay 'gnus-xmas-move-overlay)
@@ -391,8 +398,9 @@ call it with the value of the `gnus-data' text property."
   (fset 'gnus-put-text-property 'gnus-xmas-put-text-property)
       
   (require 'text-props)
-  (when (< emacs-minor-version 14)
-    (fset 'gnus-set-text-properties 'gnus-xmas-set-text-properties))
+  (if (and (<= emacs-major-version 19)
+          (< emacs-minor-version 14))
+      (fset 'gnus-set-text-properties 'gnus-xmas-set-text-properties))
 
   (when (fboundp 'turn-off-scroll-in-place)
     (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place))
@@ -426,6 +434,9 @@ call it with the value of the `gnus-data' text property."
            (color-instance-rgb-components
             (make-color-instance color))))))
 
+(defun gnus-xmas-region-active-p ()
+  (and (fboundp 'region-active-p)
+       (region-active-p)))
 
 (defun gnus-xmas-redefine ()
   "Redefine lots of Gnus functions for XEmacs."
@@ -442,13 +453,13 @@ call it with the value of the `gnus-data' text property."
   (fset 'gnus-appt-select-lowest-window 
        'gnus-xmas-appt-select-lowest-window)
   (fset 'gnus-mail-strip-quoted-names 'gnus-xmas-mail-strip-quoted-names)
-  (fset 'gnus-make-local-hook 'make-local-variable)
   (fset 'gnus-add-hook 'gnus-xmas-add-hook)
   (fset 'gnus-character-to-event 'character-to-event)
   (fset 'gnus-mode-line-buffer-identification
        'gnus-xmas-mode-line-buffer-identification)
   (fset 'gnus-key-press-event-p 'key-press-event-p)
-
+  (fset 'gnus-region-active-p 'gnus-xmas-region-active-p)
+  
   (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add)
   (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
   (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add)
@@ -477,8 +488,7 @@ call it with the value of the `gnus-data' text property."
          'gnus-xmas-topic-remove-excess-properties)
     (fset 'gnus-mode-line-buffer-identification 'identity)
     (unless (boundp 'shell-command-switch)
-      (setq shell-command-switch "-c"))
-    ))
+      (setq shell-command-switch "-c"))))
 
 
 ;;; XEmacs logo and toolbar.