Initial revision
[elisp/apel.git] / README.en
1 [README for APEL (English Version)]
2 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
3 $Id: README.en,v 1.1 1997-03-20 06:03:51 morioka Exp $
4
5 What's APEL
6 ===========
7
8   APEL stands for "A Portable Emacs Library".  It consists of
9   following modules:
10
11         emu:    A package to fill incompatibilities of emacsen
12                 emu.el --- main module
13             About mule API:
14                 emu-nemacs.el --- for NEmacs
15                 emu-e19.el    --- for Emacs 19 or XEmacs without mule
16                 emu-mule.el   --- for MULE 2.3
17                 emu-e20.el    --- for Emacs/mule (Emacs 20, MULE 3)
18                 emu-x20.el    --- for XEmacs/mule
19             About other API
20                 emu-18.el     --- for Emacs 18
21                 emu-19.el     --- for Emacs 19 or later
22                 emu-xemacs.el --- for XEmacs
23                 env.el        --- env.el for Emacs 18
24                 richtext.el   --- text/richtext module
25                                     for Emacs 19.29 or later,
26                                         XEmacs 19.14 or later
27                 tinyrich.el   --- text/richtext module for old emacsen
28
29         alist.el: utility for Association-list
30
31         atype.el: utility for atype
32
33         file-detect.el: load-path or file-detection
34
35         filename.el: utility to make file-name
36
37         install.el: utility to install emacs-lisp package
38
39
40 Installation
41 ============
42
43 (a) run in expanded place
44
45   If you don't want to install other directories, please do only
46   following:
47
48         % make
49
50   You can specify the emacs command name, for example
51
52         % make install EMACS=xemacs
53
54   If `EMACS=...' is omitted, EMACS=emacs is used.
55
56 (b) make install
57
58   If you want to install other directories, please do following:
59
60         % make install
61
62   You can specify the emacs command name, for example
63
64         % make install EMACS=xemacs
65
66   If `EMACS=...' is omitted, EMACS=emacs is used.
67
68   You can specify the prefix of the directory tree for Emacs Lisp
69   programs and shell scripts, for example:
70
71         % make install PREFIX=~/
72
73   If `PREFIX=...' is omitted, the prefix of the directory tree of the
74   specified emacs command is used (perhaps /usr/local).
75
76   For example, if PREFIX=/usr/local and EMACS 19.34 is specified, it
77   will create the following directory tree:
78
79         /usr/local/share/emacs/19.34/site-lisp/  --- emu
80         /usr/local/share/emacs/site-lisp/apel/   --- APEL
81
82   You can specify other optional settings by editing the file
83   APEL-CFG.  Please read comments in it.
84
85
86 load-path (for Emacs or MULE)
87 =============================
88
89   If you are using Emacs or Mule, please add directory of apel to
90   load-path.  If you install by default setting, you can write
91   subdirs.el for example:
92
93   --------------------------------------------------------------------
94   (normal-top-level-add-to-load-path '("apel"))
95   --------------------------------------------------------------------
96
97   If you are using XEmacs, there are no need of setting about
98   load-path.
99
100
101 How to use
102 ==========
103
104 alist
105 -----
106
107 Function put-alist (ITEM VALUE ALIST)
108
109   Modify ALIST to set VALUE to ITEM.  If there is a pair whose car is
110   ITEM, replace its cdr by VALUE.  If there is not such pair, create
111   new pair (ITEM . VALUE) and return new alist whose car is the new
112   pair and cdr is ALIST.
113
114 Function del-alist (ITEM ALIST)
115
116   If there is a pair whose key is ITEM, delete it from ALIST.
117
118 Function set-alist (SYMBOL ITEM VALUE)
119
120   Modify a alist indicated by SYMBOL to set VALUE to ITEM.
121
122   Ex. (set-alist 'auto-mode-alist "\\.pln$" 'text-mode)
123
124 Function modify-alist (MODIFIER DEFAULT)
125
126   Modify alist DEFAULT into alist MODIFIER.
127
128 Function set-modified-alist (SYMBOL MODIFIER)
129
130   Modify a value of a SYMBOL into alist MODIFIER.  The SYMBOL should
131   be alist. If it is not bound, its value regard as nil.
132
133 file-detect
134 -----------
135
136 Function add-path (PATH &rest OPTIONS)
137
138   Add PATH to `load-path' if it exists under `default-load-path'
139   directories and it does not exist in `load-path'.
140
141   You can use following PATH styles:
142
143     load-path relative: "PATH" (it is searched from
144                                 `defaul-load-path')
145
146     home directory relative: "~/PATH" "~USER/PATH"
147
148     absolute path: "/FOO/BAR/BAZ"
149
150   You can specify following OPTIONS:
151
152     'all-paths --- search from `load-path' instead of
153                    `default-load-path'
154
155     'append --- add PATH to the last of `load-path'
156
157 Function add-latest-path (PATTERN &optional ALL-PATHS)
158
159   Add latest path matched by regexp PATTERN to `load-path' if it
160   exists under `default-load-path' directories and it does not exist
161   in `load-path'.
162
163   For example, if there is bbdb-1.50 and bbdb-1.51 under site-lisp,
164   and if bbdb-1.51 is newer than bbdb-1.50, and site-lisp is
165   /usr/local/share/emacs/site-lisp,
166
167         (add-path "bbdb")
168
169   it adds "/usr/local/share/emacs/site-lisp/bbdb-1.51" to top of
170   `load-path'.
171
172   If optional argument ALL-PATHS is specified, it is searched from all
173   of `load-path' instead of `default-load-path'.
174
175 Function get-latest-path (PATTERN &optional ALL-PATHS)
176
177   Return latest directory in default-load-path which is matched to
178   regexp PATTERN.  If optional argument ALL-PATHS is specified, it is
179   searched from all of load-path instead of default-load-path.
180
181   Ex. (let ((gnus-path (get-latest-path "gnus")))
182         (add-path (expand-file-name "lisp" gnus-path))
183         (add-to-list 'Info-default-directory-list
184                      (expand-file-name "texi" gnus-path))
185         )
186
187 Function file-installed-p (FILE &optional PATHS)
188
189   Return absolute-path of FILE if FILE exists in PATHS.  If PATHS is
190   omitted, `load-path' is used.
191
192 Function exec-installed-p (FILE &optional PATHS SUFFIXES)
193
194   Return absolute-path of FILE if FILE exists in PATHS.  If PATHS is
195   omitted, `exec-path' is used.  If suffixes is omitted,
196   `exec-suffix-list' is used.
197
198 Function module-installed-p (MODULE &optional PATHS)
199
200   Return non-nil if module is provided or exists in PATHS.  If PATHS
201   is omitted, `load-path' is used.
202
203 filename
204 --------
205
206 Function replace-as-filename (string)
207
208   Return safety file-name from STRING.
209
210   It refers variable `filename-filters'.  It is list of functions for
211   file-name filter.  Default filter refers following variables:
212
213         Variable filename-limit-length
214
215           Limit size of file-name.
216
217         Variable filename-replacement-alist
218
219           Alist list of characters vs. string as replacement.  List of
220           characters represents characters not allowed as file-name.
221
222
223 Bug reports
224 -----------
225
226   If you write bug-reports and/or suggestions for improvement, please
227   send them to the tm Mailing List:
228
229         bug-tm-en@chamonix.jaist.ac.jp  (English)
230         bug-tm-ja@chamonix.jaist.ac.jp  (Japanese)
231
232   Via the tm ML, you can report tm bugs, obtain the latest release of
233   tm, and discuss future enhancements to tm. To join the tm ML, send
234   e-mail to
235
236         tm-ja-admin@chamonix.jaist.ac.jp        (Japanese)
237         tm-en-admin@chamonix.jaist.ac.jp        (English)
238
239   Since the user registration is done manually, please write the mail
240   body in human-recognizable language (^_^).