diff options
| -rw-r--r-- | lisp/international/rfc1843.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/international/rfc1843.el b/lisp/international/rfc1843.el index c1343274c93..9b918547141 100644 --- a/lisp/international/rfc1843.el +++ b/lisp/international/rfc1843.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; rfc1843.el --- HZ (rfc1843) decoding | 1 | ;;; rfc1843.el --- HZ (rfc1843) decoding -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998-2017 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | (eval-when-compile (require 'cl)) | 30 | (eval-when-compile (require 'cl-lib)) |
| 31 | 31 | ||
| 32 | (defvar rfc1843-word-regexp | 32 | (defvar rfc1843-word-regexp |
| 33 | "~\\({\\([\041-\167][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") | 33 | "~\\({\\([\041-\167][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") |
| @@ -115,15 +115,15 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" | |||
| 115 | "Decode HZ WORD and return it." | 115 | "Decode HZ WORD and return it." |
| 116 | (let ((i -1) (s (substring word 0)) v) | 116 | (let ((i -1) (s (substring word 0)) v) |
| 117 | (if (or (not firstc) (eq firstc ?{)) | 117 | (if (or (not firstc) (eq firstc ?{)) |
| 118 | (while (< (incf i) (length s)) | 118 | (while (< (cl-incf i) (length s)) |
| 119 | (if (eq (setq v (aref s i)) ? ) nil | 119 | (if (eq (setq v (aref s i)) ? ) nil |
| 120 | (aset s i (+ 128 v)))) | 120 | (aset s i (+ 128 v)))) |
| 121 | (while (< (incf i) (length s)) | 121 | (while (< (cl-incf i) (length s)) |
| 122 | (if (eq (setq v (aref s i)) ? ) nil | 122 | (if (eq (setq v (aref s i)) ? ) nil |
| 123 | (setq v (+ (* 94 v) (aref s (1+ i)) -3135)) | 123 | (setq v (+ (* 94 v) (aref s (1+ i)) -3135)) |
| 124 | (aset s i (+ (/ v 157) (if (eq firstc ?<) 201 161))) | 124 | (aset s i (+ (/ v 157) (if (eq firstc ?<) 201 161))) |
| 125 | (setq v (% v 157)) | 125 | (setq v (% v 157)) |
| 126 | (aset s (incf i) (+ v (if (< v 63) 64 98)))))) | 126 | (aset s (cl-incf i) (+ v (if (< v 63) 64 98)))))) |
| 127 | s)) | 127 | s)) |
| 128 | 128 | ||
| 129 | (provide 'rfc1843) | 129 | (provide 'rfc1843) |