From ca6e0661f8d468927a608b2b51bafe40e5b91acf Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 5 Sep 2003 04:45:16 +0000 Subject: [PATCH] (char-length): Don't use `defun-maybe' to define it since this module may be installed as the XEmacs pachage which should be usable by all the XEmacs 21.x series. --- ChangeLog | 7 +++++++ poem-xm.el | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b11d52..629fe0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-09-05 Katsumi Yamaoka + + * poem-xm.el (char-length): Don't use `defun-maybe' to define it + since this module may be installed as the XEmacs pachage which + should be usable by all the XEmacs 21.x series. + + 2003-07-05 Yuuichi Teranishi * APEL: Version 10.6 released. diff --git a/poem-xm.el b/poem-xm.el index 798ce14..0ad4943 100644 --- a/poem-xm.el +++ b/poem-xm.el @@ -68,9 +68,12 @@ 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))) ;;; @ string -- 1.7.10.4