# HG changeset patch # User Kenichi Handa # Date 904306959 0 # Node ID 173e152366287d3c711cc1aed5c3d3885b45b5c2 # Parent 48fb93ba8b103e65142bfb472140a576de4b5cfc (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. diff -r 48fb93ba8b10 -r 173e15236628 lisp/subr.el --- a/lisp/subr.el Fri Aug 28 12:22:39 1998 +0000 +++ b/lisp/subr.el Fri Aug 28 12:22:39 1998 +0000 @@ -529,14 +529,9 @@ (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 ()