tm 7.69.
[elisp/apel.git] / emu-19.el
1 ;;;
2 ;;; emu-19.el --- emu module for FSF original Emacs 19.*
3 ;;;
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
6 ;;;
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; Version:
9 ;;;     $Id: emu-19.el,v 7.7 1996/05/26 01:48:47 morioka Exp $
10 ;;; Keywords: emulation, compatibility
11 ;;;
12 ;;; This file is part of tl (Tiny Library).
13 ;;;
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.
18 ;;;
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.
23 ;;;
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.
27 ;;;
28 ;;; Code:
29
30 ;;; @ text property
31 ;;;
32
33 (defalias 'tl:set-text-properties 'set-text-properties)
34 (defalias 'tl:add-text-properties 'add-text-properties)
35 (defalias 'tl:make-overlay 'make-overlay)
36 (defalias 'tl:overlay-put 'overlay-put)
37 (defalias 'tl:overlay-buffer 'overlay-buffer)
38
39
40 ;;; @@ visible/invisible
41 ;;;
42
43 (defun invisible-region (start end)
44   (if (save-excursion
45         (goto-char (1- end))
46         (eq (following-char) ?\n)
47         )
48       (setq end (1- end))
49     )
50   (put-text-property start end 'invisible t)
51   )
52
53 (defun visible-region (start end)
54   (put-text-property start end 'invisible nil)
55   )
56
57 (defun invisible-p (pos)
58   (get-text-property pos 'invisible)
59   )
60
61 (defun next-visible-point (pos)
62   (save-excursion
63     (goto-char (next-single-property-change pos 'invisible))
64     (if (eq (following-char) ?\n)
65         (forward-char)
66       )
67     (point)
68     ))
69
70
71 ;;; @ mouse
72 ;;;
73
74 (defvar mouse-button-1 [mouse-1])
75 (defvar mouse-button-2 [mouse-2])
76 (defvar mouse-button-3 [down-mouse-3])
77
78
79 ;;; @ string
80 ;;;
81
82 (defmacro char-list-to-string (char-list)
83   "Convert list of character CHAR-LIST to string. [emu-19.el]"
84   (` (mapconcat (function char-to-string)
85                 (, char-list)
86                 "")
87      ))
88
89
90 ;;; @ end
91 ;;;
92
93 (provide 'emu-19)
94
95 ;;; emu-19.el ends here