From: morioka Date: Tue, 27 Oct 1998 14:41:21 +0000 (+0000) Subject: (char-before): Redefine to change `POS' to optional argument. X-Git-Tag: apel-9_8~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e7926330a6f17c3580b2245c00751462deff2d5;p=elisp%2Fapel.git (char-before): Redefine to change `POS' to optional argument. --- 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.