[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/url-http-ntlm 21b0f82 17/42: url-http-ntlm: Port to cl-
From: |
Stefan Monnier |
Subject: |
[elpa] externals/url-http-ntlm 21b0f82 17/42: url-http-ntlm: Port to cl-lib |
Date: |
Sat, 28 Nov 2020 17:19:45 -0500 (EST) |
branch: externals/url-http-ntlm
commit 21b0f829728e419da4192150f753c7d4a48cdeb9
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
url-http-ntlm: Port to cl-lib
* url-http-ntlm.el: Require cl-lib.
(url-http-ntlm--ensure-keepalive): Use cl-assert.
(url-http-ntlm--get-stage): Use cl-destructuring-bind.
(url-http-ntlm--authorisation): Use cl-second.
(url-http-ntlm--rmssoc): Use cl-remove.
(url-ntlm-auth): Use cl-case and cl-destructuring-bind.
---
url-http-ntlm.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/url-http-ntlm.el b/url-http-ntlm.el
index a63878d..02a7c98 100644
--- a/url-http-ntlm.el
+++ b/url-http-ntlm.el
@@ -40,7 +40,7 @@
(require 'url-auth)
(require 'url-http)
(require 'mail-parse)
-(require 'cl)
+(require 'cl-lib)
(require 'ntlm)
@@ -64,10 +64,10 @@ This is used to detect multiple calls.")
;;; Private functions.
(defun url-http-ntlm--ensure-keepalive ()
"Report an error if `url-http-attempt-keepalives' is not set."
- (assert url-http-attempt-keepalives
- nil
- (concat "NTLM authentication won't work unless"
- " `url-http-attempt-keepalives' is set!")))
+ (cl-assert url-http-attempt-keepalives
+ nil
+ (concat "NTLM authentication won't work unless"
+ " `url-http-attempt-keepalives' is set!")))
(defun url-http-ntlm--clean-headers ()
"Remove Authorization element from `url-http-extra-headers' alist."
@@ -99,7 +99,7 @@ response's \"WWW-Authenticate\" header, munged by
(cdr auth-header)))
:error)
((and (= (length args) 2)
- (destructuring-bind (challenge ntlm) args
+ (cl-destructuring-bind (challenge ntlm) args
(and (string-equal "ntlm" (car ntlm))
(string-match challenge-rxp
(car challenge)))))
@@ -137,7 +137,7 @@ stored."
nil)
;; get
(if (or both
- (and stored user (not (equal user (second stored))))
+ (and stored user (not (equal user (cl-second stored))))
(not stored))
(let* ((user* (if both
user
@@ -167,7 +167,7 @@ stored."
(defun url-http-ntlm--rmssoc (key alist)
"Remove all elements whose `car' match KEY from ALIST."
- (remove* key alist :key 'car :test 'equal))
+ (cl-remove key alist :key 'car :test 'equal))
(defun url-http-ntlm--string (data)
"Return DATA encoded as an NTLM string."
@@ -190,10 +190,10 @@ the server's last response. These are used by
`url-http-get-stage' to determine what stage we are at."
(url-http-ntlm--ensure-keepalive)
(let ((stage (url-http-ntlm--get-stage args)))
- (case stage
+ (cl-case stage
;; NTLM Type 1 message: the request
(:request
- (destructuring-bind (&optional server user hash)
+ (cl-destructuring-bind (&optional server user hash)
(url-http-ntlm--authorisation url)
(when server
(url-http-ntlm--string
@@ -201,7 +201,7 @@ the server's last response. These are used by
;; NTLM Type 3 message: the response
(:response
(let ((challenge (url-http-ntlm--get-challenge)))
- (destructuring-bind (server user hash)
+ (cl-destructuring-bind (server user hash)
(url-http-ntlm--authorisation url)
(url-http-ntlm--string
(ntlm-build-auth-response challenge
- [elpa] branch externals/url-http-ntlm created (now f5276f1), Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm c780a2b 03/42: url-http-ntlm.el: Adjust blank lines, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 94b495c 07/42: url-http-ntlm.el: Reindent whole file, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 33a3941 09/42: url-http-ntlm.el: Add maintainer header, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm aeddc9e 10/42: url-http-ntlm.el: Update installation instructions, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm f69bb6b 06/42: url-http-ntlm: Remove blank comment lines, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 8cefb06 11/42: url-http-ntlm.el: Update author's email address, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 21b0f82 17/42: url-http-ntlm: Port to cl-lib,
Stefan Monnier <=
- [elpa] externals/url-http-ntlm 516cd35 24/42: url-http-ntlm.el: Add home page header, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm a2cc6c2 23/42: url-http-ntlm: Add auth-source support, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 8efb977 26/42: url-http-ntlm.el: Require ntlm 2.0.0, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 4c8edce 20/42: url-http-ntlm: Remove limit of one username and password per server, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm de4cfea 18/42: url-http-ntlm: Override url-http-parse-headers redirect handling, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm daef9e2 15/42: url-http-ntlm: Use double dash naming convention for private symbols, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 2d0a650 16/42: url-http-ntlm.el: Add comment headings, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 334222c 14/42: url-http-ntlm.el (url-http-ntlm-last-args): Group defvar with others, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 48849b1 31/42: url-http-ntlm.el: Update copyright years, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm d070501 29/42: url-http-ntlm: Add cl-lib to Package-Requires, Stefan Monnier, 2020/11/28