poem's char-or-char-int-p causes invalid character errors

守岡知彦 / MORIOKA Tomohiko tomo @ m17n.org
2005年 5月 9日 (月) 00:19:18 JST


>>>>> In [apel-ja : No.01269] 
>>>>>	Tatsuya Kinoshita <tats @ vega.ocn.ne.jp> wrote:

> ありがとうございます。下記にパッチにしておきます。どなたかcommitして
> いただけませんか?

> 2005-05-03  Tatsuya Kinoshita  <tats @ vega.ocn.ne.jp>

> 	* poem.el (characterp): Use `char-valid-p' if it exists.
> 	* poem.el (char-or-char-int-p): Ditto.

> ----
> --- apel.orig/poem.el
> +++ apel/poem.el
> @@ -77,9 +77,15 @@
 
>  (defalias-maybe 'int-char 'identity)
 
> -(defalias-maybe 'characterp 'integerp)
> -
> -(defalias-maybe 'char-or-char-int-p 'integerp)
> +(defalias-maybe 'characterp
> +  (cond
> +   ((fboundp 'char-valid-p) 'char-valid-p)
> +   (t 'integerp)))
> +
> +(defalias-maybe 'char-or-char-int-p
> +  (cond
> +   ((fboundp 'char-valid-p) 'char-valid-p)
> +   (t 'integerp)))
 
>  (defun-maybe char-octet (ch &optional n)
>    "Return the octet numbered N (should be 0 or 1) of char CH.
> ----

patch ありがとうございます。また、commit して頂いた yoichi さま、あり
がとうございます。

ところで、ふと思ったのですが、

Index: poem.el
===================================================================
RCS file: /cvs/root/apel/poem.el,v
retrieving revision 1.15
diff -c -r1.15 poem.el
*** poem.el	8 May 2005 14:46:06 -0000	1.15
--- poem.el	8 May 2005 15:16:38 -0000
***************
*** 1,6 ****
  ;;; poem.el --- Emulate latest MULE features; -*-byte-compile-dynamic: t;-*-
  
! ;; Copyright (C) 1998,1999 Free Software Foundation, Inc.
  
  ;; Author: MORIOKA Tomohiko <morioka @ jaist.ac.jp>
  ;; Keywords: emulation, compatibility, Mule
--- 1,6 ----
  ;;; poem.el --- Emulate latest MULE features; -*-byte-compile-dynamic: t;-*-
  
! ;; Copyright (C) 1998,1999,2005 Free Software Foundation, Inc.
  
  ;; Author: MORIOKA Tomohiko <morioka @ jaist.ac.jp>
  ;; Keywords: emulation, compatibility, Mule
***************
*** 70,75 ****
--- 70,78 ----
    (char-charset (char-after pos))
    )
  
+ (defalias-maybe 'char-valid-p 'integerp)
+ 
+ 
  ;;; @ XEmacs-mule emulation
  ;;;
  
***************
*** 77,91 ****
  
  (defalias-maybe 'int-char 'identity)
  
! (defalias-maybe 'characterp
!   (cond
!    ((fboundp 'char-valid-p) 'char-valid-p)
!    (t 'integerp)))
! 
! (defalias-maybe 'char-or-char-int-p
!   (cond
!    ((fboundp 'char-valid-p) 'char-valid-p)
!    (t 'integerp)))
  
  (defun-maybe char-octet (ch &optional n)
    "Return the octet numbered N (should be 0 or 1) of char CH.
--- 80,88 ----
  
  (defalias-maybe 'int-char 'identity)
  
! (defalias-maybe 'characterp 'char-valid-p)
! 
! (defalias-maybe 'char-or-char-int-p 'char-valid-p)
  
  (defun-maybe char-octet (ch &optional n)
    "Return the octet numbered N (should be 0 or 1) of char CH.

という風に、char-valid-p を defalias-maybe してしまうのはまずいでしょ
うか?

-- 
┯━…‥・懐かしい未来の記憶をふと思い出しかけた・‥…━━┯━━━┯━
││ ─ │  ─  /    ─   ┼─     ┬                ─   ─┼ ┬┴─
┼┼─┼|〓━─┼ 守岡 知彦 (MORIOKA Tomohiko) <tomo @ m17n.org> ─ ─┬
┻┻━┻━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━





More information about the APEL-ja mailing list