From: Kenichi Handa Date: Fri, 28 Aug 1998 12:22:39 +0000 (+0000) Subject: (sref): Make it an alias of aref. Make the X-Git-Tag: emacs-20.4~1815 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0cba3a0f8168421429577948841be399c1a844bb;p=emacs.git (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 --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 ()