From 6bb762b32476cd8f778a17f225e657f079a41728 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 9 Jan 1998 22:13:08 +0000 Subject: [PATCH] (sref): Defined. --- lisp/subr.el | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- 2.39.5