1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Eliminate last uses of 'cl' in lisp/mail/

* lisp/mail/binhex.el: Use lexical-binding and avoid cl.
(binhex-push-char): Remove unused arg 'count'.
(binhex-decode-region-external): Remove unused var 'status'.

* lisp/mail/flow-fill.el: Use lexical-binding and avoid cl.

* lisp/mail/footnote.el: Reduce redundancy.
(footnote-roman-lower-regexp, footnote-roman-upper-regexp)
(footnote-roman-upper-list): Auto-generate from footnote-roman-lower-list.
(footnote-hebrew-numeric-regex): Auto-generate from footnote-hebrew-numeric.
(footnote--hebrew-numeric): Simplify.
(footnote-hebrew-symbolic-regex): Generate from footnote-hebrew-symbolic.

* lisp/mail/hashcash.el: Use lexical-binding and avoid cl.
(hashcash-verify-payment): Use pcase.

* lisp/mail/ietf-drums.el: Use lexical-binding and avoid cl.
(ietf-drums-token-to-list): Remove unused var 'e'.

* lisp/mail/rfc2231.el: Use lexical-binding and avoid cl.

* lisp/mail/uudecode.el: Use lexical-binding and avoid cl.
(uudecode-char-int): Remove unused 'eval-and-compile' wrapper.
(uudecode-decode-region-external): Remove unused 'status' var.
(uudecode-string-to-multibyte): Remove.
(uudecode-decode-region-internal): Use decode-coding-string instead.

* lisp/mail/yenc.el: Use lexical-binding and avoid cl.
This commit is contained in:
Stefan Monnier 2017-12-26 16:08:21 -05:00
parent 9f9b56b7da
commit da94ea92bc
9 changed files with 38 additions and 59 deletions

View file

@ -1,4 +1,4 @@
;;; hashcash.el --- Add hashcash payments to email
;;; hashcash.el --- Add hashcash payments to email -*- lexical-binding:t -*-
;; Copyright (C) 2003-2005, 2007-2017 Free Software Foundation, Inc.
@ -47,7 +47,7 @@
;;; Code:
(eval-when-compile (require 'cl)) ; for case
(eval-when-compile (require 'cl-lib))
(defgroup hashcash nil
"Hashcash configuration."
@ -139,12 +139,12 @@ For example, you may want to set this to (\"-Z2\") to reduce header length."
(defun hashcash-token-substring ()
(save-excursion
(let ((token ""))
(loop
(cl-loop
(setq token
(concat token (buffer-substring (point) (hashcash-point-at-eol))))
(goto-char (hashcash-point-at-eol))
(forward-char 1)
(unless (looking-at "[ \t]") (return token))
(unless (looking-at "[ \t]") (cl-return token))
(while (looking-at "[ \t]") (forward-char 1))))))
(defun hashcash-payment-required (addr)
@ -298,7 +298,7 @@ BUFFER defaults to the current buffer."
(let* ((split (split-string token ":"))
(key (if (< (hashcash-version token) 1.2)
(nth 1 split)
(case (string-to-number (nth 0 split))
(pcase (string-to-number (nth 0 split))
(0 (nth 2 split))
(1 (nth 3 split))))))
(cond ((null resource)