Enable lexical binding
This supersedes https://github.com/jwiegley/use-package/issues/617 and closes https://github.com/jwiegley/use-package/issues/648
This commit is contained in:
parent
cc9ec36f1a
commit
e2e6f9a44b
11 changed files with 66 additions and 66 deletions
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-bind-key.el --- Support for the :bind/:bind-keymap keywords
|
||||
;;; use-package-bind-key.el --- Support for the :bind/:bind-keymap keywords -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
@ -127,7 +127,7 @@ deferred until the prefix key sequence is pressed."
|
|||
|
||||
;;;###autoload
|
||||
(defun use-package-handler/:bind
|
||||
(name keyword args rest state &optional bind-macro)
|
||||
(name _keyword args rest state &optional bind-macro)
|
||||
(use-package-concat
|
||||
(use-package-process-keywords name rest state)
|
||||
`(,@(mapcar
|
||||
|
@ -148,7 +148,7 @@ deferred until the prefix key sequence is pressed."
|
|||
|
||||
;;;###autoload
|
||||
(defun use-package-handler/:bind-keymap
|
||||
(name keyword args rest state &optional override)
|
||||
(name _keyword args rest state &optional override)
|
||||
(use-package-concat
|
||||
(use-package-process-keywords name rest state)
|
||||
(mapcar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-chords.el --- key-chord keyword for use-package
|
||||
;;; use-package-chords.el --- key-chord keyword for use-package -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2015-2017 Justin Talbott
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-core.el --- A configuration macro for simplifying your .emacs
|
||||
;;; use-package-core.el --- A configuration macro for simplifying your .emacs -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
@ -47,10 +47,9 @@
|
|||
(defsubst hash-table-keys (hash-table)
|
||||
"Return a list of keys in HASH-TABLE."
|
||||
(cl-loop for k being the hash-keys of hash-table collect k))
|
||||
(require 'subr-x))
|
||||
(eval-when-compile (require 'subr-x)))
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl)
|
||||
(require 'regexp-opt))
|
||||
|
||||
(defgroup use-package nil
|
||||
|
@ -300,7 +299,7 @@ include support for finding `use-package' and `require' forms.
|
|||
Must be set before loading use-package."
|
||||
:type 'boolean
|
||||
:set
|
||||
#'(lambda (sym value)
|
||||
#'(lambda (_sym value)
|
||||
(eval-after-load 'lisp-mode
|
||||
(if value
|
||||
`(add-to-list 'lisp-imenu-generic-expression
|
||||
|
@ -546,7 +545,7 @@ extending any keys already present."
|
|||
name tail plist merge-function))
|
||||
(use-package-error error-string))))))
|
||||
|
||||
(defun use-package-unalias-keywords (name args)
|
||||
(defun use-package-unalias-keywords (_name args)
|
||||
(setq args (cl-nsubstitute :if :when args))
|
||||
(let (temp)
|
||||
(while (setq temp (plist-get args :unless))
|
||||
|
@ -779,7 +778,7 @@ no more than once."
|
|||
(setq ,loaded t ,result ,arg))))
|
||||
,@(funcall f `((funcall ,next))))))
|
||||
|
||||
(defsubst use-package-normalize-value (label arg)
|
||||
(defsubst use-package-normalize-value (_label arg)
|
||||
"Normalize the Lisp value given by ARG.
|
||||
The argument LABEL is ignored."
|
||||
(cond ((null arg) nil)
|
||||
|
@ -801,7 +800,7 @@ The argument LABEL is ignored."
|
|||
(use-package-error
|
||||
(concat label " wants a symbol, or list of symbols")))))
|
||||
|
||||
(defun use-package-normalize-symlist (name keyword args)
|
||||
(defun use-package-normalize-symlist (_name keyword args)
|
||||
(use-package-as-one (symbol-name keyword) args
|
||||
#'use-package-normalize-symbols))
|
||||
|
||||
|
@ -817,7 +816,7 @@ The argument LABEL is ignored."
|
|||
(use-package-error
|
||||
(concat label " wants a symbol, or nested list of symbols")))))
|
||||
|
||||
(defun use-package-normalize-recursive-symlist (name keyword args)
|
||||
(defun use-package-normalize-recursive-symlist (_name keyword args)
|
||||
(use-package-as-one (symbol-name keyword) args
|
||||
#'use-package-normalize-recursive-symbols))
|
||||
|
||||
|
@ -839,7 +838,7 @@ The argument LABEL is ignored."
|
|||
(use-package-error
|
||||
(concat label " wants a directory path, or list of paths")))))
|
||||
|
||||
(defun use-package-normalize-predicate (name keyword args)
|
||||
(defun use-package-normalize-predicate (_name keyword args)
|
||||
(if (null args)
|
||||
t
|
||||
(use-package-only-one (symbol-name keyword) args
|
||||
|
@ -857,7 +856,7 @@ The argument LABEL is ignored."
|
|||
(macroexpand form)
|
||||
form)) args))
|
||||
|
||||
(defun use-package-normalize-forms (name keyword args)
|
||||
(defun use-package-normalize-forms (_name keyword args)
|
||||
(use-package-normalize-form (symbol-name keyword) args))
|
||||
|
||||
(defun use-package-normalize-pairs
|
||||
|
@ -942,7 +941,7 @@ If RECURSED is non-nil, recurse into sublists."
|
|||
#'use-package-recognize-function
|
||||
name)))
|
||||
|
||||
(defun use-package-autoloads-mode (name keyword args)
|
||||
(defun use-package-autoloads-mode (_name _keyword args)
|
||||
(mapcar
|
||||
#'(lambda (x) (cons (cdr x) 'command))
|
||||
(cl-remove-if-not #'(lambda (x)
|
||||
|
@ -1055,20 +1054,21 @@ meaning:
|
|||
|
||||
;; Don't alias this to `ignore', as that will cause the resulting
|
||||
;; function to be interactive.
|
||||
(defun use-package-normalize/:disabled (name keyword arg))
|
||||
(defun use-package-normalize/:disabled (_name _keyword _arg)
|
||||
"Do nothing, return nil.")
|
||||
|
||||
(defun use-package-handler/:disabled (name keyword arg rest state)
|
||||
(defun use-package-handler/:disabled (name _keyword _arg rest state)
|
||||
(use-package-process-keywords name rest state))
|
||||
|
||||
;;;; :if, :when and :unless
|
||||
|
||||
(defun use-package-normalize-test (name keyword args)
|
||||
(defun use-package-normalize-test (_name keyword args)
|
||||
(use-package-only-one (symbol-name keyword) args
|
||||
#'use-package-normalize-value))
|
||||
|
||||
(defalias 'use-package-normalize/:if 'use-package-normalize-test)
|
||||
|
||||
(defun use-package-handler/:if (name keyword pred rest state)
|
||||
(defun use-package-handler/:if (name _keyword pred rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
`((when ,pred ,@body))))
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ meaning:
|
|||
|
||||
(defalias 'use-package-normalize/:unless 'use-package-normalize-test)
|
||||
|
||||
(defun use-package-handler/:unless (name keyword pred rest state)
|
||||
(defun use-package-handler/:unless (name _keyword pred rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
`((unless ,pred ,@body))))
|
||||
|
||||
|
@ -1086,7 +1086,7 @@ meaning:
|
|||
|
||||
(defalias 'use-package-normalize/:requires 'use-package-normalize-symlist)
|
||||
|
||||
(defun use-package-handler/:requires (name keyword requires rest state)
|
||||
(defun use-package-handler/:requires (name _keyword requires rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(if (null requires)
|
||||
body
|
||||
|
@ -1097,11 +1097,11 @@ meaning:
|
|||
|
||||
;;;; :load-path
|
||||
|
||||
(defun use-package-normalize/:load-path (name keyword args)
|
||||
(defun use-package-normalize/:load-path (_name keyword args)
|
||||
(use-package-as-one (symbol-name keyword) args
|
||||
#'use-package-normalize-paths))
|
||||
|
||||
(defun use-package-handler/:load-path (name keyword arg rest state)
|
||||
(defun use-package-handler/:load-path (name _keyword arg rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(use-package-concat
|
||||
(mapcar #'(lambda (path)
|
||||
|
@ -1113,28 +1113,28 @@ meaning:
|
|||
|
||||
(defalias 'use-package-normalize/:no-require 'use-package-normalize-predicate)
|
||||
|
||||
(defun use-package-handler/:no-require (name keyword arg rest state)
|
||||
(defun use-package-handler/:no-require (name _keyword _arg rest state)
|
||||
(use-package-process-keywords name rest state))
|
||||
|
||||
;;;; :defines
|
||||
|
||||
(defalias 'use-package-normalize/:defines 'use-package-normalize-symlist)
|
||||
|
||||
(defun use-package-handler/:defines (name keyword arg rest state)
|
||||
(defun use-package-handler/:defines (name _keyword _arg rest state)
|
||||
(use-package-process-keywords name rest state))
|
||||
|
||||
;;;; :functions
|
||||
|
||||
(defalias 'use-package-normalize/:functions 'use-package-normalize-symlist)
|
||||
|
||||
(defun use-package-handler/:functions (name keyword arg rest state)
|
||||
(defun use-package-handler/:functions (name _keyword _arg rest state)
|
||||
(use-package-process-keywords name rest state))
|
||||
|
||||
;;;; :preface
|
||||
|
||||
(defalias 'use-package-normalize/:preface 'use-package-normalize-forms)
|
||||
|
||||
(defun use-package-handler/:preface (name keyword arg rest state)
|
||||
(defun use-package-handler/:preface (name _keyword arg rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(use-package-concat
|
||||
(when use-package-compute-statistics
|
||||
|
@ -1148,14 +1148,14 @@ meaning:
|
|||
;;;; :catch
|
||||
|
||||
(defvar use-package--form)
|
||||
(defvar use-package--hush-function #'(lambda (keyword body) body))
|
||||
(defvar use-package--hush-function #'(lambda (_keyword body) body))
|
||||
|
||||
(defsubst use-package-hush (context keyword body)
|
||||
`((condition-case-unless-debug err
|
||||
,(macroexp-progn body)
|
||||
(error (funcall ,context ,keyword err)))))
|
||||
|
||||
(defun use-package-normalize/:catch (name keyword args)
|
||||
(defun use-package-normalize/:catch (_name keyword args)
|
||||
(if (null args)
|
||||
t
|
||||
(use-package-only-one (symbol-name keyword) args
|
||||
|
@ -1199,7 +1199,7 @@ meaning:
|
|||
(defalias 'use-package-normalize/:interpreter 'use-package-normalize-mode)
|
||||
(defalias 'use-package-autoloads/:interpreter 'use-package-autoloads-mode)
|
||||
|
||||
(defun use-package-handler/:interpreter (name keyword arg rest state)
|
||||
(defun use-package-handler/:interpreter (name _keyword arg rest state)
|
||||
(use-package-handle-mode name 'interpreter-mode-alist arg rest state))
|
||||
|
||||
;;;; :mode
|
||||
|
@ -1207,7 +1207,7 @@ meaning:
|
|||
(defalias 'use-package-normalize/:mode 'use-package-normalize-mode)
|
||||
(defalias 'use-package-autoloads/:mode 'use-package-autoloads-mode)
|
||||
|
||||
(defun use-package-handler/:mode (name keyword arg rest state)
|
||||
(defun use-package-handler/:mode (name _keyword arg rest state)
|
||||
(use-package-handle-mode name 'auto-mode-alist arg rest state))
|
||||
|
||||
;;;; :magic
|
||||
|
@ -1215,7 +1215,7 @@ meaning:
|
|||
(defalias 'use-package-normalize/:magic 'use-package-normalize-mode)
|
||||
(defalias 'use-package-autoloads/:magic 'use-package-autoloads-mode)
|
||||
|
||||
(defun use-package-handler/:magic (name keyword arg rest state)
|
||||
(defun use-package-handler/:magic (name _keyword arg rest state)
|
||||
(use-package-handle-mode name 'magic-mode-alist arg rest state))
|
||||
|
||||
;;;; :magic-fallback
|
||||
|
@ -1223,7 +1223,7 @@ meaning:
|
|||
(defalias 'use-package-normalize/:magic-fallback 'use-package-normalize-mode)
|
||||
(defalias 'use-package-autoloads/:magic-fallback 'use-package-autoloads-mode)
|
||||
|
||||
(defun use-package-handler/:magic-fallback (name keyword arg rest state)
|
||||
(defun use-package-handler/:magic-fallback (name _keyword arg rest state)
|
||||
(use-package-handle-mode name 'magic-fallback-mode-alist arg rest state))
|
||||
|
||||
;;;; :hook
|
||||
|
@ -1250,7 +1250,7 @@ meaning:
|
|||
|
||||
(defalias 'use-package-autoloads/:hook 'use-package-autoloads-mode)
|
||||
|
||||
(defun use-package-handler/:hook (name keyword args rest state)
|
||||
(defun use-package-handler/:hook (name _keyword args rest state)
|
||||
"Generate use-package custom keyword code."
|
||||
(use-package-concat
|
||||
(use-package-process-keywords name rest state)
|
||||
|
@ -1273,7 +1273,7 @@ meaning:
|
|||
|
||||
(defalias 'use-package-normalize/:commands 'use-package-normalize-symlist)
|
||||
|
||||
(defun use-package-handler/:commands (name keyword arg rest state)
|
||||
(defun use-package-handler/:commands (name _keyword arg rest state)
|
||||
(use-package-concat
|
||||
;; Since we deferring load, establish any necessary autoloads, and also
|
||||
;; keep the byte-compiler happy.
|
||||
|
@ -1295,7 +1295,7 @@ meaning:
|
|||
|
||||
(defalias 'use-package-normalize/:defer 'use-package-normalize-predicate)
|
||||
|
||||
(defun use-package-handler/:defer (name keyword arg rest state)
|
||||
(defun use-package-handler/:defer (name _keyword arg rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(use-package-concat
|
||||
;; Load the package after a set amount of idle time, if the argument to
|
||||
|
@ -1351,7 +1351,7 @@ no keyword implies `:all'."
|
|||
((listp features)
|
||||
(use-package-require-after-load (cons :all features) body))))
|
||||
|
||||
(defun use-package-handler/:after (name keyword arg rest state)
|
||||
(defun use-package-handler/:after (name _keyword arg rest state)
|
||||
(let ((body (use-package-process-keywords name rest state))
|
||||
(uses (use-package-after-count-uses arg)))
|
||||
(if (or (null uses) (null body))
|
||||
|
@ -1366,12 +1366,12 @@ no keyword implies `:all'."
|
|||
|
||||
(defalias 'use-package-normalize/:demand 'use-package-normalize-predicate)
|
||||
|
||||
(defun use-package-handler/:demand (name keyword arg rest state)
|
||||
(defun use-package-handler/:demand (name _keyword _arg rest state)
|
||||
(use-package-process-keywords name rest state))
|
||||
|
||||
;;;; :custom
|
||||
|
||||
(defun use-package-normalize/:custom (name keyword args)
|
||||
(defun use-package-normalize/:custom (_name keyword args)
|
||||
"Normalize use-package custom keyword."
|
||||
(use-package-as-one (symbol-name keyword) args
|
||||
#'(lambda (label arg)
|
||||
|
@ -1383,7 +1383,7 @@ no keyword implies `:all'."
|
|||
(list arg)
|
||||
arg))))
|
||||
|
||||
(defun use-package-handler/:custom (name keyword args rest state)
|
||||
(defun use-package-handler/:custom (name _keyword args rest state)
|
||||
"Generate use-package custom keyword code."
|
||||
(use-package-concat
|
||||
(mapcar
|
||||
|
@ -1399,7 +1399,7 @@ no keyword implies `:all'."
|
|||
|
||||
;;;; :custom-face
|
||||
|
||||
(defun use-package-normalize/:custom-face (name-symbol keyword arg)
|
||||
(defun use-package-normalize/:custom-face (name-symbol _keyword arg)
|
||||
"Normalize use-package custom-face keyword."
|
||||
(let ((error-msg
|
||||
(format "%s wants a (<symbol> <face-spec>) or list of these"
|
||||
|
@ -1416,7 +1416,7 @@ no keyword implies `:all'."
|
|||
(> (length def) 2))
|
||||
(use-package-error error-msg))))))
|
||||
|
||||
(defun use-package-handler/:custom-face (name keyword args rest state)
|
||||
(defun use-package-handler/:custom-face (name _keyword args rest state)
|
||||
"Generate use-package custom-face keyword code."
|
||||
(use-package-concat
|
||||
(mapcar #'(lambda (def) `(custom-set-faces (quote ,def))) args)
|
||||
|
@ -1426,7 +1426,7 @@ no keyword implies `:all'."
|
|||
|
||||
(defalias 'use-package-normalize/:init 'use-package-normalize-forms)
|
||||
|
||||
(defun use-package-handler/:init (name keyword arg rest state)
|
||||
(defun use-package-handler/:init (name _keyword arg rest state)
|
||||
(use-package-concat
|
||||
(when use-package-compute-statistics
|
||||
`((use-package-statistics-gather :init ',name nil)))
|
||||
|
@ -1451,7 +1451,7 @@ no keyword implies `:all'."
|
|||
args
|
||||
(list args)))
|
||||
|
||||
(defun use-package-handler/:load (name keyword arg rest state)
|
||||
(defun use-package-handler/:load (name _keyword arg rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(cl-dolist (pkg arg)
|
||||
(setq body (use-package-require (if (eq t pkg) name pkg) nil body)))
|
||||
|
@ -1461,7 +1461,7 @@ no keyword implies `:all'."
|
|||
|
||||
(defalias 'use-package-normalize/:config 'use-package-normalize-forms)
|
||||
|
||||
(defun use-package-handler/:config (name keyword arg rest state)
|
||||
(defun use-package-handler/:config (name _keyword arg rest state)
|
||||
(let* ((body (use-package-process-keywords name rest state))
|
||||
(name-symbol (use-package-as-symbol name)))
|
||||
(use-package-concat
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-delight.el --- Support for the :delight keyword
|
||||
;;; use-package-delight.el --- Support for the :delight keyword -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
|||
":delight expects `delight' arguments or a list of them"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun use-package-normalize/:delight (name keyword args)
|
||||
(defun use-package-normalize/:delight (name _keyword args)
|
||||
"Normalize arguments to delight."
|
||||
(cond ((null args)
|
||||
`((,(use-package-as-mode name) nil ,name)))
|
||||
|
@ -77,7 +77,7 @@
|
|||
args)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun use-package-handler/:delight (name keyword args rest state)
|
||||
(defun use-package-handler/:delight (name _keyword args rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(use-package-concat
|
||||
body
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-diminish.el --- Support for the :diminish keyword
|
||||
;;; use-package-diminish.el --- Support for the :diminish keyword -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
|||
(apply-partially #'use-package-normalize-diminish name) t))
|
||||
|
||||
;;;###autoload
|
||||
(defun use-package-handler/:diminish (name keyword arg rest state)
|
||||
(defun use-package-handler/:diminish (name _keyword arg rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(use-package-concat
|
||||
(mapcar #'(lambda (var)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-ensure-system-package.el --- auto install system packages -*- lexical: t; -*-
|
||||
;;; use-package-ensure-system-package.el --- auto install system packages -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2017 Justin Talbott
|
||||
|
||||
|
@ -43,10 +43,10 @@
|
|||
(use-package-ensure-system-package-install-command (symbol-name (cdr arg))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun use-package-normalize/:ensure-system-package (name-symbol keyword args)
|
||||
(defun use-package-normalize/:ensure-system-package (_name-symbol keyword args)
|
||||
"Turn `arg' into a list of cons-es of (`package-name' . `install-command')."
|
||||
(use-package-only-one (symbol-name keyword) args
|
||||
(lambda (label arg)
|
||||
(lambda (_label arg)
|
||||
(cond
|
||||
((and (listp arg) (listp (cdr arg)))
|
||||
(mapcar #'use-package-ensure-system-package-consify arg))
|
||||
|
@ -54,7 +54,7 @@
|
|||
(list (use-package-ensure-system-package-consify arg)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun use-package-handler/:ensure-system-package (name keyword arg rest state)
|
||||
(defun use-package-handler/:ensure-system-package (name _keyword arg rest state)
|
||||
"Execute the handler for `:ensure-system-package' keyword in `use-package'."
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
(use-package-concat
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-ensure.el --- Support for the :ensure and :pin keywords
|
||||
;;; use-package-ensure.el --- Support for the :ensure and :pin keywords -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
@ -76,9 +76,9 @@ The default value uses package.el to install the package."
|
|||
|
||||
;;;; :pin
|
||||
|
||||
(defun use-package-normalize/:pin (name keyword args)
|
||||
(defun use-package-normalize/:pin (_name keyword args)
|
||||
(use-package-only-one (symbol-name keyword) args
|
||||
#'(lambda (label arg)
|
||||
#'(lambda (_label arg)
|
||||
(cond
|
||||
((stringp arg) arg)
|
||||
((use-package-non-nil-symbolp arg) (symbol-name arg))
|
||||
|
@ -116,7 +116,7 @@ manually updated package."
|
|||
(unless (bound-and-true-p package--initialized)
|
||||
(package-initialize t))))
|
||||
|
||||
(defun use-package-handler/:pin (name keyword archive-name rest state)
|
||||
(defun use-package-handler/:pin (name _keyword archive-name rest state)
|
||||
(let ((body (use-package-process-keywords name rest state))
|
||||
(pin-form (if archive-name
|
||||
`(use-package-pin-package ',(use-package-as-symbol name)
|
||||
|
@ -133,11 +133,11 @@ manually updated package."
|
|||
(defvar package-archive-contents)
|
||||
|
||||
;;;###autoload
|
||||
(defun use-package-normalize/:ensure (name keyword args)
|
||||
(defun use-package-normalize/:ensure (_name keyword args)
|
||||
(if (null args)
|
||||
(list t)
|
||||
(use-package-only-one (symbol-name keyword) args
|
||||
#'(lambda (label arg)
|
||||
#'(lambda (_label arg)
|
||||
(cond
|
||||
((symbolp arg)
|
||||
(list arg))
|
||||
|
@ -152,7 +152,7 @@ manually updated package."
|
|||
(concat ":ensure wants an optional package name "
|
||||
"(an unquoted symbol name), or (<symbol> :pin <string>)"))))))))
|
||||
|
||||
(defun use-package-ensure-elpa (name args state &optional no-refresh)
|
||||
(defun use-package-ensure-elpa (name args _state &optional _no-refresh)
|
||||
(dolist (ensure args)
|
||||
(let ((package
|
||||
(or (and (eq ensure t) (use-package-as-symbol name))
|
||||
|
@ -183,7 +183,7 @@ manually updated package."
|
|||
:error))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun use-package-handler/:ensure (name keyword ensure rest state)
|
||||
(defun use-package-handler/:ensure (name _keyword ensure rest state)
|
||||
(let* ((body (use-package-process-keywords name rest state)))
|
||||
;; We want to avoid installing packages when the `use-package' macro is
|
||||
;; being macro-expanded by elisp completion (see `lisp--local-variables'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-jump.el --- Attempt to jump to a use-package declaration
|
||||
;;; use-package-jump.el --- Attempt to jump to a use-package declaration -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-lint.el --- Attempt to find errors in use-package declarations
|
||||
;;; use-package-lint.el --- Attempt to find errors in use-package declarations -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package.el --- A configuration macro for simplifying your .emacs
|
||||
;;; use-package.el --- A configuration macro for simplifying your .emacs -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2012-2017 John Wiegley
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; use-package-tests.el --- Tests for use-package.el
|
||||
;;; use-package-tests.el --- Tests for use-package.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This program is free software; you can redistribute it and/or
|
||||
;; modify it under the terms of the GNU General Public License as
|
||||
|
|
Loading…
Add table
Reference in a new issue