Commit 2eee73e7 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/international/rfc1843.el: Don't require CL. Use lexical-binding.

parent f037e98f
;;; rfc1843.el --- HZ (rfc1843) decoding
;;; rfc1843.el --- HZ (rfc1843) decoding -*- lexical-binding:t -*-
;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
......@@ -27,7 +27,7 @@
;;; Code:
(eval-when-compile (require 'cl))
(eval-when-compile (require 'cl-lib))
(defvar rfc1843-word-regexp
"~\\({\\([\041-\167][\041-\176]\\| \\)+\\)\\(~}\\|$\\)")
......@@ -115,15 +115,15 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc"
"Decode HZ WORD and return it."
(let ((i -1) (s (substring word 0)) v)
(if (or (not firstc) (eq firstc ?{))
(while (< (incf i) (length s))
(while (< (cl-incf i) (length s))
(if (eq (setq v (aref s i)) ? ) nil
(aset s i (+ 128 v))))
(while (< (incf i) (length s))
(while (< (cl-incf i) (length s))
(if (eq (setq v (aref s i)) ? ) nil
(setq v (+ (* 94 v) (aref s (1+ i)) -3135))
(aset s i (+ (/ v 157) (if (eq firstc ?<) 201 161)))
(setq v (% v 157))
(aset s (incf i) (+ v (if (< v 63) 64 98))))))
(aset s (cl-incf i) (+ v (if (< v 63) 64 98))))))
s))
(provide 'rfc1843)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment