Skip to content

Commit

Permalink
Enable lexical binding and drop Emacs 23 support
Browse files Browse the repository at this point in the history
  • Loading branch information
syohex committed Apr 19, 2016
1 parent 02db9e3 commit 70c6132
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion request-deferred.el
@@ -1,4 +1,4 @@
;;; request-deferred.el --- Wrap request.el by deferred
;;; request-deferred.el --- Wrap request.el by deferred -*- lexical-binding: t; -*-

;; Copyright (C) 2012 Takafumi Arakaki

Expand Down
10 changes: 5 additions & 5 deletions request.el
@@ -1,11 +1,11 @@
;;; request.el --- Compatible layer for URL request in Emacs
;;; request.el --- Compatible layer for URL request in Emacs -*- lexical-binding: t; -*-

;; Copyright (C) 2012 Takafumi Arakaki
;; Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2012
;; Free Software Foundation, Inc.

;; Author: Takafumi Arakaki <aka.tkf at gmail.com>
;; Package-Requires: ((cl-lib "0.5"))
;; Package-Requires: ((emacs "24") (cl-lib "0.5"))
;; Version: 0.2.0

;; This file is NOT part of GNU Emacs.
Expand Down Expand Up @@ -41,10 +41,10 @@
;;; Code:

(eval-when-compile
(require 'cl) ; for obsolete `lexical-let'
(require 'cl-lib)
(defvar url-http-method)
(defvar url-http-response-status))

(require 'cl-lib)
(require 'url)
(require 'mail-utils)

Expand Down Expand Up @@ -1102,7 +1102,7 @@ START-URL is the URL requested."
(cl-defun request--curl-sync (url &rest settings &key response &allow-other-keys)
;; To make timeout work, use polling approach rather than using
;; `call-process'.
(lexical-let (finished)
(let (finished)
(prog1 (apply #'request--curl url
:complete (lambda (&rest _) (setq finished t))
settings)
Expand Down
4 changes: 2 additions & 2 deletions tests/request-testing.el
@@ -1,4 +1,4 @@
;;; request-testing.el --- Testing framework for request.el
;;; request-testing.el --- Testing framework for request.el -*- lexical-binding: t; -*-

;; Copyright (C) 2012 Takafumi Arakaki

Expand Down Expand Up @@ -126,7 +126,7 @@ The symbols other than `response' is bound using `cl-symbol-macrolet'."
(apply #'request (request-testing-url url) args))

(defun request-testing-sync (url &rest args)
(lexical-let (err timeout)
(let (err timeout)
(let ((result
(deferred:sync!
(deferred:timeout
Expand Down
2 changes: 1 addition & 1 deletion tests/test-request.el
@@ -1,4 +1,4 @@
;;; test-request.el --- Tests for request.el
;;; test-request.el --- Tests for request.el -*- lexical-binding: t; -*-

;; Copyright (C) 2012 Takafumi Arakaki

Expand Down

0 comments on commit 70c6132

Please sign in to comment.