From 0cba3a0f8168421429577948841be399c1a844bb Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 28 Aug 1998 12:22:39 +0000 Subject: [PATCH] (sref): Make it an alias of aref. Make the byte-compiler warn that it is obsolete. (char-bytes): Make the byte-compiler warn that it is obsolete. --- lisp/subr.el | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 6b1b4dff224..826f52a85ff 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -529,14 +529,9 @@ 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) - "Obsolete function returning a character in STRING at BYTE-INDEX. -Please convert your programs to use `aref' with character-base index." - (let ((byte 0) (char 0)) - (while (< byte byte-index) - (setq byte (+ byte (char-bytes (aref string char))) - char (1+ char))) - (aref string char))) +(defalias 'sref 'aref) +(make-obsolete 'sref 'aref) +(make-obsolete 'char-bytes "Now this function always returns 1") ;; Some programs still use this as a function. (defun baud-rate () -- 2.39.2