;;; 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
(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)
(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))
(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."
(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)
'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.