diff options
-rw-r--r-- | lisp/subr.el | 6 |
1 files changed, 6 insertions, 0 deletions
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. |