From 0f2b938c8394751a5465f846e0b715be4a7fccc1 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 28 Oct 1998 01:31:34 +0000 Subject: [PATCH] (char-after): Redefine to change `POS' to optional argument. --- ChangeLog | 6 ++++++ poem-om.el | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6e9c132..6a311a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-10-28 Katsumi Yamaoka + + * poem-om.el (char-after): Redefine to change `POS' to optional + argument. + + 1998-10-27 MORIOKA Tomohiko * APEL: Version 9.8 was released. diff --git a/poem-om.el b/poem-om.el index cdc2794..4c3f13e 100644 --- a/poem-om.el +++ b/poem-om.el @@ -272,6 +272,21 @@ If POS is out of range, the value is nil." (si:char-before (or pos (point))) ))))) +(if (subr-fboundp 'char-after) + (condition-case err + (char-after) + (error + (when (and (eq (car (get (car err) 'error-conditions)) + 'wrong-number-of-arguments) + (not (boundp 'si:char-after))) + (fset 'si:char-after (symbol-function 'char-after)) + (defun char-after (&optional pos) + "Return character in current buffer at position POS. +POS is an integer or a buffer pointer. +If POS is out of range, the value is nil." + (si:char-after (or pos (point))) + ))))) + ;;; @@ obsoleted aliases ;;; ;;; You should not use them. -- 1.7.10.4