Mercurial > emacs
changeset 23134:173e15236628
(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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 28 Aug 1998 12:22:39 +0000 |
parents | 48fb93ba8b10 |
children | 99ab9c46504a |
files | lisp/subr.el |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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 ()