diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-10-21 15:37:13 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-10-21 15:40:46 +0200 |
commit | 234cf7491872155dbd9716dc4652febefbe3759f (patch) | |
tree | 4e5a71c6f3c463c89a69be0eabbb360537500d9e /lisp/mail/binhex.el | |
parent | 29cb2fdd0c09235a91282f54e81c9856e39bd3ca (diff) | |
download | emacs-234cf7491872155dbd9716dc4652febefbe3759f.tar.gz emacs-234cf7491872155dbd9716dc4652febefbe3759f.tar.bz2 emacs-234cf7491872155dbd9716dc4652febefbe3759f.zip |
Remove some compat code from uudecode.el and binhex.el
* lisp/mail/uudecode.el (uudecode-char-int): Make obsolete.
(uudecode-decode-region-internal): Adjust callers.
* lisp/mail/binhex.el (binhex-char-int): Make obsolete.
(binhex-string-big-endian, binhex-string-little-endian)
(binhex-header): Adjust callers.
Diffstat (limited to 'lisp/mail/binhex.el')
-rw-r--r-- | lisp/mail/binhex.el | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el index 2c77f88f97b..431c681be01 100644 --- a/lisp/mail/binhex.el +++ b/lisp/mail/binhex.el @@ -29,12 +29,6 @@ ;;; Code: -(eval-and-compile - (defalias 'binhex-char-int - (if (fboundp 'char-int) - 'char-int - 'identity))) - (defgroup binhex nil "Decoding of BinHex (binary-to-hexadecimal) data." :group 'mail @@ -150,14 +144,14 @@ input and write the converted data to its standard output." (defun binhex-string-big-endian (string) (let ((ret 0) (i 0) (len (length string))) (while (< i len) - (setq ret (+ (ash ret 8) (binhex-char-int (aref string i))) + (setq ret (+ (ash ret 8) (aref string i)) i (1+ i))) ret)) (defun binhex-string-little-endian (string) (let ((ret 0) (i 0) (shift 0) (len (length string))) (while (< i len) - (setq ret (+ ret (ash (binhex-char-int (aref string i)) shift)) + (setq ret (+ ret (ash (aref string i) shift)) i (1+ i) shift (+ shift 8))) ret)) @@ -167,11 +161,11 @@ input and write the converted data to its standard output." (let ((pos (point-min)) len) (vector (prog1 - (setq len (binhex-char-int (char-after pos))) + (setq len (char-after pos)) (setq pos (1+ pos))) (buffer-substring pos (setq pos (+ pos len))) (prog1 - (setq len (binhex-char-int (char-after pos))) + (setq len (char-after pos)) (setq pos (1+ pos))) (buffer-substring pos (setq pos (+ pos 4))) (buffer-substring pos (setq pos (+ pos 4))) @@ -323,6 +317,8 @@ If HEADER-ONLY is non-nil only decode header and return filename." (binhex-decode-region-external start end) (binhex-decode-region-internal start end))) +(define-obsolete-function-alias 'binhex-char-int #'identity) + (provide 'binhex) ;;; binhex.el ends here |