From 9e7926330a6f17c3580b2245c00751462deff2d5 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 27 Oct 1998 14:41:21 +0000 Subject: [PATCH] (char-before): Redefine to change `POS' to optional argument. --- poem-om.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/poem-om.el b/poem-om.el index 5579e09..cdc2794 100644 --- a/poem-om.el +++ b/poem-om.el @@ -257,6 +257,21 @@ but the contents viewed as characters do change. "Return index of character succeeding CHAR whose index is INDEX." (` (+ (, index) (char-bytes (, char))))) +(if (subr-fboundp 'char-before) + (condition-case err + (char-before) + (error + (when (and (eq (car (get (car err) 'error-conditions)) + 'wrong-number-of-arguments) + (not (boundp 'si:char-before))) + (fset 'si:char-before (symbol-function 'char-before)) + (defun char-before (&optional pos) + "Return character in current buffer preceding position POS. +POS is an integer or a buffer pointer. +If POS is out of range, the value is nil." + (si:char-before (or pos (point))) + ))))) + ;;; @@ obsoleted aliases ;;; ;;; You should not use them. -- 1.7.10.4