From: Richard M. Stallman Date: Fri, 9 Jan 1998 22:13:08 +0000 (+0000) Subject: (sref): Defined. X-Git-Tag: emacs-20.3~2469 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6bb762b32476cd8f778a17f225e657f079a41728;p=emacs.git (sref): Defined. --- diff --git a/lisp/subr.el b/lisp/subr.el index 6dd33424cd2..683c8e291b2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -511,6 +511,12 @@ as returned by the `event-start' and `event-end' functions." (defalias 'compiled-function-p 'byte-code-function-p) (defalias 'define-function 'defalias) +(defun sref (string byte-index) + (let ((byte 0) (char 0)) + (while (< byte byte-index) + (setq byte (+ byte (char-bytes (aref string byte))))) + (aref string char))) + ;; Some programs still use this as a function. (defun baud-rate () "Obsolete function returning the value of the `baud-rate' variable.