2 ;;; emu-xemacs.el --- Emacs 19 emulation module for XEmacs
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1995 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
9 ;;; $Id: emu-xemacs.el,v 7.8 1996/05/26 02:13:21 morioka Exp $
10 ;;; Keywords: emulation, compatibility, XEmacs
12 ;;; This file is part of tl (Tiny Library).
14 ;;; This program is free software; you can redistribute it and/or
15 ;;; modify it under the terms of the GNU General Public License as
16 ;;; published by the Free Software Foundation; either version 2, or
17 ;;; (at your option) any later version.
19 ;;; This program is distributed in the hope that it will be useful,
20 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 ;;; General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with This program. If not, write to the Free Software
26 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
33 (or (fboundp 'face-list)
34 (defalias 'face-list 'list-faces)
37 (or (memq 'underline (face-list))
38 (and (fboundp 'make-face)
39 (make-face 'underline)
42 (or (face-differs-from-default-p 'underline)
43 (set-face-underline-p 'underline t))
45 (or (fboundp 'tl:set-text-properties)
46 (defun tl:set-text-properties (start end props &optional buffer)
47 (if (or (null buffer) (bufferp buffer))
51 start end (car props) (nth 1 props) buffer)
52 (setq props (nthcdr 2 props)))
53 (remove-text-properties start end ())
57 (defun tl:add-text-properties (start end properties)
58 (add-text-properties start end
59 (append properties (list 'highlight t))
63 (defalias 'tl:make-overlay 'make-extent)
64 (defalias 'tl:overlay-put 'set-extent-property)
65 (defalias 'tl:overlay-buffer 'extent-buffer)
67 (defun tl:move-overlay (extent start end &optional buffer)
68 (set-extent-endpoints extent start end)
72 ;;; @@ visible/invisible
75 (defun invisible-region (start end)
78 (eq (following-char) ?\n)
80 (setq start (1+ start))
82 (put-text-property start end 'invisible t)
85 (defun visible-region (start end)
86 (put-text-property start end 'invisible nil)
89 (defun invisible-p (pos)
92 (eq (following-char) ?\n)
96 (get-text-property pos 'invisible)
99 (defun next-visible-point (pos)
103 (eq (following-char) ?\n)
107 (next-single-property-change pos 'invisible)
114 (defvar mouse-button-1 'button1)
115 (defvar mouse-button-2 'button2)
116 (defvar mouse-button-3 'button3)
122 (or (fboundp 'dired-other-frame)
123 (defun dired-other-frame (dirname &optional switches)
124 "\"Edit\" directory DIRNAME. Like `dired' but makes a new frame."
125 (interactive (dired-read-dir-and-switches "in other frame "))
126 (switch-to-buffer-other-frame (dired-noselect dirname switches))
134 (defmacro char-list-to-string (char-list)
135 "Convert list of character CHAR-LIST to string. [emu-xemacs.el]"
136 `(mapconcat #'char-to-string ,char-list ""))
142 (provide 'emu-xemacs)
144 ;;; emu-xemacs.el ends here