comparison lisp/tl/emu-xemacs.el @ 8:4b173ad71786 r19-15b5

Import from CVS: tag r19-15b5
author cvs
date Mon, 13 Aug 2007 08:47:35 +0200
parents b82b59fe008d
children ec9a17fef872
comparison
equal deleted inserted replaced
7:c153ca296910 8:4b173ad71786
1 ;;; emu-xemacs.el --- Emacs 19 emulation module for XEmacs 1 ;;; emu-xemacs.el --- emu API implementation for XEmacs
2 2
3 ;; Copyright (C) 1995 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995,1996 MORIOKA Tomohiko 4 ;; Copyright (C) 1995,1996 MORIOKA Tomohiko
5 5
6 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> 6 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
7 ;; Version: 7 ;; Version:
8 ;; $Id: emu-xemacs.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ 8 ;; $Id: emu-xemacs.el,v 1.2 1996/12/22 00:29:30 steve Exp $
9 ;; Keywords: emulation, compatibility, XEmacs 9 ;; Keywords: emulation, compatibility, XEmacs
10 10
11 ;; This file is part of tl (Tiny Library). 11 ;; This file is part of emu.
12 12
13 ;; This program is free software; you can redistribute it and/or 13 ;; This program is free software; you can redistribute it and/or
14 ;; modify it under the terms of the GNU General Public License as 14 ;; modify it under the terms of the GNU General Public License as
15 ;; published by the Free Software Foundation; either version 2, or (at 15 ;; published by the Free Software Foundation; either version 2, or (at
16 ;; your option) any later version. 16 ;; your option) any later version.
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of 19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 ;; General Public License for more details. 21 ;; General Public License for more details.
22 22
23 ;; You should have received a copy of the GNU General Public License 23 ;; You should have received a copy of the GNU General Public License
24 ;; along with this program; see the file COPYING. If not, write to 24 ;; along with XEmacs; see the file COPYING. If not, write to the Free
25 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 25 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 ;; Boston, MA 02111-1307, USA. 26 ;; 02111-1307, USA.
27 27
28 ;;; Code: 28 ;;; Code:
29 29
30 ;;; @ text property 30 ;;; @ text property
31 ;;; 31 ;;;
139 (defmacro char-list-to-string (char-list) 139 (defmacro char-list-to-string (char-list)
140 "Convert list of character CHAR-LIST to string. [emu-xemacs.el]" 140 "Convert list of character CHAR-LIST to string. [emu-xemacs.el]"
141 `(mapconcat #'char-to-string ,char-list "")) 141 `(mapconcat #'char-to-string ,char-list ""))
142 142
143 143
144 ;;; @@ to avoid bug of XEmacs 19.14
145 ;;;
146
147 (or (string-match "^../"
148 (file-relative-name "/usr/local/share" "/usr/local/lib"))
149 ;; This function was imported from Emacs 19.33.
150 (defun file-relative-name (filename &optional directory)
151 "Convert FILENAME to be relative to DIRECTORY
152 (default: default-directory). [emu-xemacs.el]"
153 (setq filename (expand-file-name filename)
154 directory (file-name-as-directory
155 (expand-file-name
156 (or directory default-directory))))
157 (let ((ancestor ""))
158 (while (not (string-match (concat "^" (regexp-quote directory))
159 filename))
160 (setq directory (file-name-directory (substring directory 0 -1))
161 ancestor (concat "../" ancestor)))
162 (concat ancestor (substring filename (match-end 0)))
163 ))
164 )
165
166
144 ;;; @ end 167 ;;; @ end
145 ;;; 168 ;;;
146 169
147 (provide 'emu-xemacs) 170 (provide 'emu-xemacs)
148 171