+++ /dev/null
-[README for APEL (English Version)]
-by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-$Id: README.en,v 1.2 1997-05-10 19:39:12 morioka Exp $
-
-What's APEL?
-============
-
- APEL stands for "A Portable Emacs Library". It consists of
- following modules:
-
- emu: A package to fill incompatibilities of emacsen
- emu.el --- main module
- About mule API:
- emu-nemacs.el --- for NEmacs
- emu-e19.el --- for Emacs 19 or XEmacs without mule
- emu-mule.el --- for MULE 2.3
- emu-e20.el --- for Emacs/mule (Emacs 20, MULE 3)
- emu-x20.el --- for XEmacs/mule
- About other API
- emu-18.el --- for Emacs 18
- emu-19.el --- for Emacs 19 or later
- emu-xemacs.el --- for XEmacs
- env.el --- env.el for Emacs 18
- richtext.el --- text/richtext module
- for Emacs 19.29 or later,
- XEmacs 19.14 or later
- tinyrich.el --- text/richtext module for old emacsen
-
- alist.el: utility for Association-list
-
- atype.el: utility for atype
-
- file-detect.el: load-path or file-detection
-
- filename.el: utility to make file-name
-
- install.el: utility to install emacs-lisp package
-
- mule-caesar.el: ROT 13-47-48 Caesar rotation utility
-
- std11: RFC 822/STD 11 parser and utility
- std11.el --- main module
- std11-parse.el --- parser
-
-
-Installation
-============
-
-(a) run in expanded place
-
- If you don't want to install other directories, please do only
- following:
-
- % make
-
- You can specify the emacs command name, for example
-
- % make install EMACS=xemacs
-
- If `EMACS=...' is omitted, EMACS=emacs is used.
-
-(b) make install
-
- If you want to install other directories, please do following:
-
- % make install
-
- You can specify the emacs command name, for example
-
- % make install EMACS=xemacs
-
- If `EMACS=...' is omitted, EMACS=emacs is used.
-
- You can specify the prefix of the directory tree for Emacs Lisp
- programs and shell scripts, for example:
-
- % make install PREFIX=~/
-
- If `PREFIX=...' is omitted, the prefix of the directory tree of the
- specified emacs command is used (perhaps /usr/local).
-
- For example, if PREFIX=/usr/local and EMACS 19.34 is specified, it
- will create the following directory tree:
-
- /usr/local/share/emacs/19.34/site-lisp/ --- emu
- /usr/local/share/emacs/site-lisp/apel/ --- APEL
-
- You can specify other optional settings by editing the file
- APEL-CFG. Please read comments in it.
-
-
-load-path (for Emacs or MULE)
-=============================
-
- If you are using Emacs or Mule, please add directory of apel to
- load-path. If you install by default setting, you can write
- subdirs.el for example:
-
- --------------------------------------------------------------------
- (normal-top-level-add-to-load-path '("apel"))
- --------------------------------------------------------------------
-
- If you are using XEmacs, there are no need of setting about
- load-path.
-
-
-How to use
-==========
-
-alist
------
-
-Function put-alist (ITEM VALUE ALIST)
-
- Modify ALIST to set VALUE to ITEM. If there is a pair whose car is
- ITEM, replace its cdr by VALUE. If there is not such pair, create
- new pair (ITEM . VALUE) and return new alist whose car is the new
- pair and cdr is ALIST.
-
-Function del-alist (ITEM ALIST)
-
- If there is a pair whose key is ITEM, delete it from ALIST.
-
-Function set-alist (SYMBOL ITEM VALUE)
-
- Modify a alist indicated by SYMBOL to set VALUE to ITEM.
-
- Ex. (set-alist 'auto-mode-alist "\\.pln$" 'text-mode)
-
-Function modify-alist (MODIFIER DEFAULT)
-
- Modify alist DEFAULT into alist MODIFIER.
-
-Function set-modified-alist (SYMBOL MODIFIER)
-
- Modify a value of a SYMBOL into alist MODIFIER. The SYMBOL should
- be alist. If it is not bound, its value regard as nil.
-
-file-detect
------------
-
-Function add-path (PATH &rest OPTIONS)
-
- Add PATH to `load-path' if it exists under `default-load-path'
- directories and it does not exist in `load-path'.
-
- You can use following PATH styles:
-
- load-path relative: "PATH" (it is searched from
- `defaul-load-path')
-
- home directory relative: "~/PATH" "~USER/PATH"
-
- absolute path: "/FOO/BAR/BAZ"
-
- You can specify following OPTIONS:
-
- 'all-paths --- search from `load-path' instead of
- `default-load-path'
-
- 'append --- add PATH to the last of `load-path'
-
-Function add-latest-path (PATTERN &optional ALL-PATHS)
-
- Add latest path matched by regexp PATTERN to `load-path' if it
- exists under `default-load-path' directories and it does not exist
- in `load-path'.
-
- For example, if there is bbdb-1.50 and bbdb-1.51 under site-lisp,
- and if bbdb-1.51 is newer than bbdb-1.50, and site-lisp is
- /usr/local/share/emacs/site-lisp,
-
- (add-path "bbdb")
-
- it adds "/usr/local/share/emacs/site-lisp/bbdb-1.51" to top of
- `load-path'.
-
- If optional argument ALL-PATHS is specified, it is searched from all
- of `load-path' instead of `default-load-path'.
-
-Function get-latest-path (PATTERN &optional ALL-PATHS)
-
- Return latest directory in default-load-path which is matched to
- regexp PATTERN. If optional argument ALL-PATHS is specified, it is
- searched from all of load-path instead of default-load-path.
-
- Ex. (let ((gnus-path (get-latest-path "gnus")))
- (add-path (expand-file-name "lisp" gnus-path))
- (add-to-list 'Info-default-directory-list
- (expand-file-name "texi" gnus-path))
- )
-
-Function file-installed-p (FILE &optional PATHS)
-
- Return absolute-path of FILE if FILE exists in PATHS. If PATHS is
- omitted, `load-path' is used.
-
-Function exec-installed-p (FILE &optional PATHS SUFFIXES)
-
- Return absolute-path of FILE if FILE exists in PATHS. If PATHS is
- omitted, `exec-path' is used. If suffixes is omitted,
- `exec-suffix-list' is used.
-
-Function module-installed-p (MODULE &optional PATHS)
-
- Return non-nil if module is provided or exists in PATHS. If PATHS
- is omitted, `load-path' is used.
-
-filename
---------
-
-Function replace-as-filename (string)
-
- Return safety file-name from STRING.
-
- It refers variable `filename-filters'. It is list of functions for
- file-name filter. Default filter refers following variables:
-
- Variable filename-limit-length
-
- Limit size of file-name.
-
- Variable filename-replacement-alist
-
- Alist list of characters vs. string as replacement. List of
- characters represents characters not allowed as file-name.
-
-
-Bug reports
------------
-
- If you write bug-reports and/or suggestions for improvement, please
- send them to the tm Mailing List:
-
- bug-tm-en@chamonix.jaist.ac.jp (English)
- bug-tm-ja@chamonix.jaist.ac.jp (Japanese)
-
- Via the tm ML, you can report tm bugs, obtain the latest release of
- tm, and discuss future enhancements to tm. To join the tm ML, send
- e-mail to
-
- tm-ja-admin@chamonix.jaist.ac.jp (Japanese)
- tm-en-admin@chamonix.jaist.ac.jp (English)
-
- Since the user registration is done manually, please write the mail
- body in human-recognizable language (^_^).
+++ /dev/null
-;;; env.el --- functions to manipulate environment variables.
-
-;; Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: processes, unix
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;; UNIX processes inherit a list of name-to-string associations from their
-;; parents called their `environment'; these are commonly used to control
-;; program options. This package permits you to set environment variables
-;; to be passed to any sub-process run under Emacs.
-
-;;; Code:
-
-;; History list for environment variable names.
-(defvar read-envvar-name-history nil)
-
-(defun read-envvar-name (prompt &optional mustmatch)
- "Read environment variable name, prompting with PROMPT.
-Optional second arg MUSTMATCH, if non-nil, means require existing envvar name.
-If it is also not t, RET does not exit if it does non-null completion."
- (completing-read prompt
- (mapcar (function
- (lambda (enventry)
- (list (substring enventry 0
- (string-match "=" enventry)))))
- process-environment)
- nil mustmatch nil 'read-envvar-name-history))
-
-;; History list for VALUE argument to setenv.
-(defvar setenv-history nil)
-
-;;;###autoload
-(defun setenv (variable &optional value unset)
- "Set the value of the environment variable named VARIABLE to VALUE.
-VARIABLE should be a string. VALUE is optional; if not provided or is
-`nil', the environment variable VARIABLE will be removed.
-
-Interactively, a prefix argument means to unset the variable.
-Interactively, the current value (if any) of the variable
-appears at the front of the history list when you type in the new value.
-
-This function works by modifying `process-environment'."
- (interactive
- (if current-prefix-arg
- (list (read-envvar-name "Clear environment variable: " 'exact) nil t)
- (let* ((var (read-envvar-name "Set environment variable: " nil))
- (oldval (getenv var))
- newval
- oldhist)
- ;; Don't put the current value on the history
- ;; if it is already there.
- (if (equal oldval (car setenv-history))
- (setq oldval nil))
- ;; Now if OLDVAL is non-nil, we should add it to the history.
- (if oldval
- (setq setenv-history (cons oldval setenv-history)))
- (setq oldhist setenv-history)
- (setq newval (read-from-minibuffer (format "Set %s to value: " var)
- nil nil nil 'setenv-history))
- ;; If we added the current value to the history, remove it.
- ;; Note that read-from-minibuffer may have added the new value.
- ;; Don't remove that!
- (if oldval
- (if (eq oldhist setenv-history)
- (setq setenv-history (cdr setenv-history))
- (setcdr setenv-history (cdr (cdr setenv-history)))))
- ;; Here finally we specify the args to give call setenv with.
- (list var newval))))
- (if unset (setq value nil))
- (if (string-match "=" variable)
- (error "Environment variable name `%s' contains `='" variable)
- (let ((pattern (concat "\\`" (regexp-quote (concat variable "="))))
- (case-fold-search nil)
- (scan process-environment)
- found)
- (if (string-equal "TZ" variable)
- (set-time-zone-rule value))
- (while scan
- (cond ((string-match pattern (car scan))
- (setq found t)
- (if (eq nil value)
- (setq process-environment (delq (car scan) process-environment))
- (setcar scan (concat variable "=" value)))
- (setq scan nil)))
- (setq scan (cdr scan)))
- (or found
- (if value
- (setq process-environment
- (cons (concat variable "=" value)
- process-environment)))))))
-
-(provide 'env)
-
-;;; env.el ends here