X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fapel.git;a=blobdiff_plain;f=poem-xm.el;h=88cf3885675521658f18c78e831429a8f6f21318;hp=eb36c9885f8337007f9b09bd8537e129ba7ce7c8;hb=8fea4843a926e356bb5e6fb7850d1a05bde1f0ca;hpb=56cd1604887babe9da4355a3aaa7551017e5cb93 diff --git a/poem-xm.el b/poem-xm.el index eb36c98..88cf388 100644 --- a/poem-xm.el +++ b/poem-xm.el @@ -1,6 +1,6 @@ ;;; poem-xm.el --- poem module for XEmacs-mule; -*-byte-compile-dynamic: t;-*- -;; Copyright (C) 1998,1999 Free Software Foundation, Inc. +;; Copyright (C) 1998,1999,2002,2003,2005 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Keywords: emulation, compatibility, Mule @@ -19,8 +19,8 @@ ;; 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. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -68,9 +68,14 @@ but the contents viewed as characters do change. "Return index of character succeeding CHAR whose index is INDEX." `(1+ ,index)) -(defun-maybe char-length (char) - "Return indexing length of multi-byte form of CHAR." - 1) +(if (not (fboundp 'char-length)) + (defalias 'char-length + (lambda (char) + "Return number of bytes a CHARACTER occupies in a string or buffer. +It always returns 1 in XEmacs. It is for compatibility with MULE 2.3." + 1))) + +(defalias-maybe 'char-valid-p 'characterp) ;;; @ string @@ -79,6 +84,9 @@ but the contents viewed as characters do change. (defun-maybe string-to-int-list (str) (mapcar #'char-int str)) +(defun-maybe string-to-char-list (str) + (mapcar #'identity str)) + (defalias 'looking-at-as-unibyte 'looking-at)