tm 7.102.
[elisp/apel.git] / emu-19.el
1 ;;; emu-19.el --- emu API implementation for Emacs 19.*
2
3 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Version: $Id: emu-19.el,v 7.10 1996/11/28 18:17:45 morioka Exp $
7 ;; Keywords: emulation, compatibility
8
9 ;; This file is part of emu.
10
11 ;; This program is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation; either version 2, or (at
14 ;; your option) any later version.
15
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Code:
27
28 ;;; @ text property
29 ;;;
30
31 (defalias 'tl:set-text-properties 'set-text-properties)
32 (defalias 'tl:add-text-properties 'add-text-properties)
33 (defalias 'tl:make-overlay 'make-overlay)
34 (defalias 'tl:overlay-put 'overlay-put)
35 (defalias 'tl:overlay-buffer 'overlay-buffer)
36
37
38 ;;; @@ visible/invisible
39 ;;;
40
41 (defmacro enable-invisible ())
42
43 (defmacro end-of-invisible ())
44
45 (defun invisible-region (start end)
46   (if (save-excursion
47         (goto-char (1- end))
48         (eq (following-char) ?\n)
49         )
50       (setq end (1- end))
51     )
52   (put-text-property start end 'invisible t)
53   )
54
55 (defun visible-region (start end)
56   (put-text-property start end 'invisible nil)
57   )
58
59 (defun invisible-p (pos)
60   (get-text-property pos 'invisible)
61   )
62
63 (defun next-visible-point (pos)
64   (save-excursion
65     (goto-char (next-single-property-change pos 'invisible))
66     (if (eq (following-char) ?\n)
67         (forward-char)
68       )
69     (point)
70     ))
71
72
73 ;;; @ mouse
74 ;;;
75
76 (defvar mouse-button-1 [mouse-1])
77 (defvar mouse-button-2 [mouse-2])
78 (defvar mouse-button-3 [down-mouse-3])
79
80
81 ;;; @ string
82 ;;;
83
84 (defmacro char-list-to-string (char-list)
85   "Convert list of character CHAR-LIST to string. [emu-19.el]"
86   (` (mapconcat (function char-to-string)
87                 (, char-list)
88                 "")
89      ))
90
91
92 ;;; @ end
93 ;;;
94
95 (provide 'emu-19)
96
97 ;;; emu-19.el ends here