emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3b19663: * lisp/url/url-history.el: Use lexical-bin


From: Stefan Monnier
Subject: [Emacs-diffs] master 3b19663: * lisp/url/url-history.el: Use lexical-binding
Date: Wed, 28 Jun 2017 10:44:29 -0400 (EDT)

branch: master
commit 3b19663b44be29986ebaacfb3a3c95130cd65964
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/url/url-history.el: Use lexical-binding
    
    (url-completion-function): Mark as obsolete.
    Mark unused args accordingly.
---
 lisp/url/url-history.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index 70a1a0c..8657d19 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -1,4 +1,4 @@
-;;; url-history.el --- Global history tracking for URL package
+;;; url-history.el --- Global history tracking for URL package  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 1996-1999, 2004-2017 Free Software Foundation, Inc.
 
@@ -157,6 +157,7 @@ user for what type to save as."
   (gethash url url-history-hash-table nil))
 
 (defun url-completion-function (string predicate function)
+  (declare (obsolete url-history-hash-table "26.1"))
   ;; Completion function to complete urls from the history.
   ;; This is obsolete since we can now pass the hash-table directly as a
   ;; completion table.
@@ -164,7 +165,7 @@ user for what type to save as."
   (cond
    ((eq function nil)
     (let ((list nil))
-      (maphash (lambda (key val) (push key list))
+      (maphash (lambda (key _) (push key list))
                url-history-hash-table)
       ;; Not sure why we bother reversing the list.  --Stef
       (try-completion string (nreverse list) predicate)))
@@ -172,7 +173,7 @@ user for what type to save as."
     (let ((stub (concat "\\`" (regexp-quote string)))
          (retval nil))
       (maphash
-       (lambda (url time)
+       (lambda (url _)
          (if (string-match stub url) (push url retval)))
        url-history-hash-table)
       retval))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]