1 ;;; gnus-ems.el --- functions for making Gnus work under different Emacsen
2 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to
21 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
27 (defvar gnus-mouse-2 [mouse-2])
28 (defvar gnus-easymenu 'easymenu)
30 ;; We do not byte-compile this file, because error messages are such a
35 ((string-match "XEmacs\\|Lucid" emacs-version)
36 ;; XEmacs definitions.
38 (setq gnus-mouse-2 [button2])
39 (setq gnus-easymenu 'auc-menu)
41 (or (memq 'underline (list-faces))
42 (make-face 'underline))
43 (or (face-differs-from-default-p 'underline)
44 (set-face-underline-p 'underline t))
45 (or (fboundp 'set-text-properties)
46 (defun set-text-properties (start end props &optional buffer)
48 (put-text-property start end (car props) (cadr props) buffer)
49 (remove-text-properties start end ()))))
51 (or (fboundp 'make-overlay (fset 'make-overlay 'make-extent)))
52 (or (fboundp 'over-lay-put (fset 'overlay-put 'set-extent-property)))
53 (or (boundp 'standard-display-table (setq standard-display-table nil)))
57 (setq gnus-group-mode-hook
60 (easy-menu-add gnus-group-reading-menu)
61 (easy-menu-add gnus-group-group-menu)
62 (easy-menu-add gnus-group-post-menu)
63 (easy-menu-add gnus-group-misc-menu)
64 (gnus-install-mouse-tracker))
65 gnus-group-mode-hook))
66 (setq gnus-summary-mode-hook
69 (easy-menu-add gnus-summary-mark-menu)
70 (easy-menu-add gnus-summary-move-menu)
71 (easy-menu-add gnus-summary-article-menu)
72 (easy-menu-add gnus-summary-thread-menu)
73 (easy-menu-add gnus-summary-misc-menu)
74 (easy-menu-add gnus-summary-post-menu)
75 (easy-menu-add gnus-summary-kill-menu)
76 (gnus-install-mouse-tracker))
77 gnus-summary-mode-hook))
78 (setq gnus-article-mode-hook
81 (easy-menu-add gnus-article-article-menu)
82 (easy-menu-add gnus-article-treatment-menu))
83 gnus-article-mode-hook)))
85 (defun gnus-install-mouse-tracker ()
86 (require 'mode-motion)
87 (setq mode-motion-hook 'mode-motion-highlight-line)))
89 ((and (not (string-match "28.9" emacs-version))
90 (not (string-match "29" emacs-version)))
91 (setq gnus-hidden-properties '(invisible t)))
98 (defun gnus-dummy-func (&rest args))
99 (let ((funcs '(mouse-set-point make-face set-face-foreground
100 set-face-background)))
102 (or (fboundp (car funcs))
103 (fset (car funcs) 'gnus-dummy-func))
104 (setq funcs (cdr funcs)))))
107 (defun gnus-ems-redefine ()
109 ((string-match "XEmacs\\|Lucid" emacs-version)
110 ;; XEmacs definitions.
111 (fset 'gnus-set-mouse-face (lambda (string) string))
113 (defun gnus-summary-make-display-table ()
114 (let* ((table (window-display-table)))
116 (setq table (make-vector 261 ())))
118 (while (>= (setq i (1- i)) 0)
119 (aset table i [??])))
122 (while (>= (setq i (1- i)) 127)
123 (aset table i [??])))
124 (setq gnus-summary-display-table table)))
133 ;; byte-compile-warnings: nil
136 ;;; gnus-ems.el ends here