1 ;;; riece-xemacs.el --- XEmacs specific functions
2 ;; Copyright (C) 1998-2003 Daiki Ueno
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
7 ;; This file is part of Riece.
9 ;; This program 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 ;; This program 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 the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
26 (require 'riece-compat)
28 (defun riece-xemacs-hide-modeline ()
29 "Remove modeline from current window."
30 (set-specifier has-modeline-p nil (current-buffer)))
32 (when (featurep 'scrollbar)
33 (defun riece-xemacs-hide-scrollbars ()
34 (if (boundp 'horizontal-scrollbar-visible-p)
35 (set-specifier horizontal-scrollbar-visible-p nil (current-buffer))
36 (if (boundp 'scrollbar-height)
37 (set-specifier scrollbar-height 0 (current-buffer)))))
38 (add-hook 'riece-user-list-mode-hook 'riece-xemacs-hide-scrollbars)
39 (add-hook 'riece-channel-list-mode-hook 'riece-xemacs-hide-scrollbars))
41 (add-hook 'riece-user-list-mode-hook 'riece-xemacs-hide-modeline)
42 (add-hook 'riece-channel-list-mode-hook 'riece-xemacs-hide-modeline)
44 (defun riece-xemacs-mode-line-buffer-identification (line)
45 "Decorate 1st element of `mode-line-buffer-identification' LINE.
46 Modify whole identification by side effect."
47 (let ((id (car line)) chop)
48 (if (and (stringp id) (string-match "^Riece:" id))
50 (setq chop (match-end 0))
53 (cons (copy-extent modeline-buffer-id-left-extent)
54 (substring id 0 chop))
55 (cons (copy-extent modeline-buffer-id-right-extent)
60 (defun riece-xemacs-simplify-modeline-format ()
61 "Remove unnecessary information from `modeline-format'."
63 (remrassq 'modeline-modified
64 (delq 'modeline-multibyte-status
65 (copy-sequence mode-line-format)))))
67 (defalias 'riece-mode-line-buffer-identification
68 'riece-xemacs-mode-line-buffer-identification)
70 (defalias 'riece-simplify-mode-line-format
71 'riece-xemacs-simplify-modeline-format)
73 (defalias 'riece-set-case-syntax-pair
76 (provide 'riece-xemacs)
78 ;;; riece-xemacs.el ends here