Mercurial > emacs
comparison lisp/subr.el @ 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 | 4d7992b69c29 |
children | ce2cac0f1682 |
comparison
equal
deleted
inserted
replaced
23133:48fb93ba8b10 | 23134:173e15236628 |
---|---|
527 (defalias 'buffer-flush-undo 'buffer-disable-undo) | 527 (defalias 'buffer-flush-undo 'buffer-disable-undo) |
528 (defalias 'eval-current-buffer 'eval-buffer) | 528 (defalias 'eval-current-buffer 'eval-buffer) |
529 (defalias 'compiled-function-p 'byte-code-function-p) | 529 (defalias 'compiled-function-p 'byte-code-function-p) |
530 (defalias 'define-function 'defalias) | 530 (defalias 'define-function 'defalias) |
531 | 531 |
532 (defun sref (string byte-index) | 532 (defalias 'sref 'aref) |
533 "Obsolete function returning a character in STRING at BYTE-INDEX. | 533 (make-obsolete 'sref 'aref) |
534 Please convert your programs to use `aref' with character-base index." | 534 (make-obsolete 'char-bytes "Now this function always returns 1") |
535 (let ((byte 0) (char 0)) | |
536 (while (< byte byte-index) | |
537 (setq byte (+ byte (char-bytes (aref string char))) | |
538 char (1+ char))) | |
539 (aref string char))) | |
540 | 535 |
541 ;; Some programs still use this as a function. | 536 ;; Some programs still use this as a function. |
542 (defun baud-rate () | 537 (defun baud-rate () |
543 "Obsolete function returning the value of the `baud-rate' variable. | 538 "Obsolete function returning the value of the `baud-rate' variable. |
544 Please convert your programs to use the variable `baud-rate' directly." | 539 Please convert your programs to use the variable `baud-rate' directly." |