1 ;;; xwem-compat.el --- GNU Emacs compatibility layer.
3 ;; Copyright (C) 2003-2005 by XWEM Org.
5 ;; Author: Zajcev Evgeny <zevlg@yandex.ru>
6 ;; Created: Fri Dec 12 15:51:10 MSK 2003
7 ;; Keywords: xwem, xlib
8 ;; X-CVS: $Id: xwem-compat.el,v 1.7 2005-04-04 19:54:10 lg Exp $
10 ;; This file is part of XWEM.
12 ;; XWEM is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; XWEM is distributed in the hope that it will be useful, but WITHOUT
18 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
20 ;; License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 ;;; Synched up with: Not in FSF
31 ;; Compatibility layer betwean XEmacs and GNU Emacs. However xwem
32 ;; still can't run on GNU Emacs.
37 (defvar xwem-gnuemacs-p (string-match "GNU Emacs" emacs-version)
38 "Non-nil when running under GNU Emacs.")
40 (defun xwem-define-prefix-command (name &optional mapvar)
41 "Compat version for `define-prefix-command'."
43 (define-prefix-command name)
44 (define-prefix-command name t)))
46 (unless (fboundp 'set-keymap-default-binding)
47 (fset 'set-keymap-default-binding
48 #'(lambda (keym cmd) (define-key keym [t] cmd))))
50 (unless (fboundp 'events-to-keys)
51 (defalias 'events-to-keys 'identity))
54 (provide 'xwem-compat)
56 ;;; xwem-compat.el ends here