summaryrefslogtreecommitdiff
path: root/lisp/mail/hashcash.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-12-26 16:08:21 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2017-12-26 16:08:21 -0500
commitda94ea92bc3ba6c236b394c00e6bbb725131a149 (patch)
tree4003e09722563503f2bd557d1bde630a76e82972 /lisp/mail/hashcash.el
parent9f9b56b7da323bc91cdde0bcc1e1863c523e7ee3 (diff)
downloademacs-da94ea92bc3ba6c236b394c00e6bbb725131a149.tar.gz
emacs-da94ea92bc3ba6c236b394c00e6bbb725131a149.tar.bz2
emacs-da94ea92bc3ba6c236b394c00e6bbb725131a149.zip
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.
Diffstat (limited to 'lisp/mail/hashcash.el')
-rw-r--r--lisp/mail/hashcash.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el
index ff00ce4069e..9f7152a9b0b 100644
--- a/lisp/mail/hashcash.el
+++ b/lisp/mail/hashcash.el
@@ -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)