[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 8ce1ae7 17/32: url-http-ntlm: Port to cl-lib
From: |
Thomas Fitzsimmons |
Subject: |
[elpa] master 8ce1ae7 17/32: url-http-ntlm: Port to cl-lib |
Date: |
Thu, 18 Feb 2016 03:28:15 +0000 |
branch: master
commit 8ce1ae7c82f2d0d9fb85652304fdcbfacd0c0fe8
Author: Thomas Fitzsimmons <address@hidden>
Commit: Thomas Fitzsimmons <address@hidden>
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.
---
packages/url-http-ntlm/url-http-ntlm.el | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/packages/url-http-ntlm/url-http-ntlm.el
b/packages/url-http-ntlm/url-http-ntlm.el
index a63878d..02a7c98 100644
--- a/packages/url-http-ntlm/url-http-ntlm.el
+++ b/packages/url-http-ntlm/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] master 50656c4 07/32: url-http-ntlm.el: Reindent whole file, (continued)
- [elpa] master 50656c4 07/32: url-http-ntlm.el: Reindent whole file, Thomas Fitzsimmons, 2016/02/17
- [elpa] master cec4982 08/32: url-http-ntlm.el: Update copyright owner and years, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 2d39d5d 09/32: url-http-ntlm.el: Add maintainer header, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 3033c48 10/32: url-http-ntlm.el: Update installation instructions, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 19e93aa 11/32: url-http-ntlm.el: Update author's email address, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 6fb3a70 12/32: url-http-ntlm: Use url-http-ntlm namespace consistently, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 4128f4f 13/32: url-http-ntlm.el (url-ntlm-auth): Move defun near end of file, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 55e7f42 14/32: url-http-ntlm.el (url-http-ntlm-last-args): Group defvar with others, Thomas Fitzsimmons, 2016/02/17
- [elpa] master d251ed3 15/32: url-http-ntlm: Use double dash naming convention for private symbols, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 47e1c41 16/32: url-http-ntlm.el: Add comment headings, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 8ce1ae7 17/32: url-http-ntlm: Port to cl-lib,
Thomas Fitzsimmons <=
- [elpa] master 2dbfb38 19/32: url-http-ntlm: Prevent infinite loops, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 355e756 20/32: url-http-ntlm: Remove limit of one username and password per server, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 0f6ba4d 21/32: url-http-ntlm: Declare url-http-extra-headers special, Thomas Fitzsimmons, 2016/02/17
- [elpa] master eba1c75 18/32: url-http-ntlm: Override url-http-parse-headers redirect handling, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 904d3e6 22/32: url-http-ntlm: Autoload url-ntlm-auth and its registration, Thomas Fitzsimmons, 2016/02/17
- [elpa] master bc582f8 23/32: url-http-ntlm: Add auth-source support, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 8892d9c 24/32: url-http-ntlm.el: Add home page header, Thomas Fitzsimmons, 2016/02/17
- [elpa] master e036b16 25/32: url-http-ntlm: Change spelling of authorization function, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 5b6c59f 26/32: url-http-ntlm.el: Require ntlm 2.0.0, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 35668bf 27/32: url-http-ntlm: Shorten first line of some docstrings, Thomas Fitzsimmons, 2016/02/17