Skip to content
Newer
Older
100644 107 lines (82 sloc) 2.75 KB
56d3a97 (rassoc): New function.
morioka authored
1 ;;; poem.el --- Emulate latest MULE features; -*-byte-compile-dynamic: t;-*-
62e993f New module.
morioka authored
2
7274f54 Require pces.el.
morioka authored
3 ;; Copyright (C) 1998,1999 Free Software Foundation, Inc.
62e993f New module.
morioka authored
4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Keywords: emulation, compatibility, Mule
7
f9da630 - Rename emu-e20_2.el and emu-e20_3.el to poem-e20_2.el and
morioka authored
8 ;; This file is part of APEL (A Portable Emacs Library).
62e993f New module.
morioka authored
9
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2, or (at
13 ;; your option) any later version.
14
15 ;; This program is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
eefe87e Update FSF's address in GPL notices.
yamaoka authored
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02110-1301, USA.
62e993f New module.
morioka authored
24
25 ;;; Code:
26
7274f54 Require pces.el.
morioka authored
27 (require 'pces)
a443e90 * poem-20.el, poem-e20_2.el, poem-ltn1.el, poem-nemacs.el, poem-om.el
yamaoka authored
28
f9da630 - Rename emu-e20_2.el and emu-e20_3.el to poem-e20_2.el and
morioka authored
29 (cond ((featurep 'mule)
30 (cond ((featurep 'xemacs)
31 (require 'poem-xm)
32 )
33 ((>= emacs-major-version 20)
34 (require 'poem-e20)
35 )
36 (t
37 ;; for MULE 1.* and 2.*
38 (require 'poem-om)
39 ))
40 )
41 ((boundp 'NEMACS)
42 ;; for Nemacs and Nepoch
43 (require 'poem-nemacs)
44 )
45 (t
35b98a0 (install-detect-elisp-directory): Fix problem on Nemacs.
morioka authored
46 (require 'poem-ltn1)
f9da630 - Rename emu-e20_2.el and emu-e20_3.el to poem-e20_2.el and
morioka authored
47 ))
383cb06 (looking-at-as-unibyte): New alias.
morioka authored
48
62e993f New module.
morioka authored
49
2e178dc update.
morioka authored
50 ;;; @ Emacs 20.3 emulation
51 ;;;
52
56d3a97 (rassoc): New function.
morioka authored
53 (defsubst-maybe string-as-unibyte (string)
2e178dc update.
morioka authored
54 "Return a unibyte string with the same individual bytes as STRING.
55 If STRING is unibyte, the result is STRING itself.
56 \[Emacs 20.3 emulating macro]"
57 string)
58
56d3a97 (rassoc): New function.
morioka authored
59 (defsubst-maybe string-as-multibyte (string)
2e178dc update.
morioka authored
60 "Return a multibyte string with the same individual bytes as STRING.
61 If STRING is multibyte, the result is STRING itself.
62 \[Emacs 20.3 emulating macro]"
63 string)
64
eed3832 (charset-after): New function.
keiichi authored
65 (defun-maybe charset-after (&optional pos)
66 "Return charset of a character in current buffer at position POS.
aae601c Correct misspellings.
yamaoka authored
67 If POS is nil, it defaults to the current point.
eed3832 (charset-after): New function.
keiichi authored
68 If POS is out of range, the value is nil.
69 \[Emacs 20.3 emulating function]"
70 (char-charset (char-after pos))
71 )
2e178dc update.
morioka authored
72
56d3a97 (rassoc): New function.
morioka authored
73 ;;; @ XEmacs-mule emulation
2e178dc update.
morioka authored
74 ;;;
75
56d3a97 (rassoc): New function.
morioka authored
76 (defalias-maybe 'char-int 'identity)
2e178dc update.
morioka authored
77
56d3a97 (rassoc): New function.
morioka authored
78 (defalias-maybe 'int-char 'identity)
2e178dc update.
morioka authored
79
e3792df 2005-05-03 Tatsuya Kinoshita <tats@vega.ocn.ne.jp>
yoichi authored
80 (defalias-maybe 'characterp
81 (cond
82 ((fboundp 'char-valid-p) 'char-valid-p)
83 (t 'integerp)))
84
85 (defalias-maybe 'char-or-char-int-p
86 (cond
87 ((fboundp 'char-valid-p) 'char-valid-p)
88 (t 'integerp)))
56d3a97 (rassoc): New function.
morioka authored
89
f6750b8 update.
morioka authored
90 (defun-maybe char-octet (ch &optional n)
91 "Return the octet numbered N (should be 0 or 1) of char CH.
f4d20b8 (char-octet): fix typo.
morioka authored
92 N defaults to 0 if omitted. [XEmacs-mule emulating function]"
f6750b8 update.
morioka authored
93 (or (nth (if n
259a830 update.
morioka authored
94 (1+ n)
95 1)
f6750b8 update.
morioka authored
96 (split-char ch))
97 0))
98
2e178dc update.
morioka authored
99
62e993f New module.
morioka authored
100 ;;; @ end
101 ;;;
102
d52455a Add product information.
keiichi authored
103 (require 'product)
104 (product-provide (provide 'poem) (require 'apel-ver))
62e993f New module.
morioka authored
105
f9da630 - Rename emu-e20_2.el and emu-e20_3.el to poem-e20_2.el and
morioka authored
106 ;;; poem.el ends here
Something went wrong with that request. Please try again.