diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2018-11-10 18:52:37 +0100 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2018-11-10 18:52:37 +0100 |
commit | fc6fef68692d1a9802a836e13168ebc72b30f36d (patch) | |
tree | 19f9f14f2a7ccc9812c225aafdc7872af08d4961 /lisp/use-package | |
parent | 3f96971febd4fdda5dbde6600168d9ec5c12db90 (diff) | |
download | emacs-fc6fef68692d1a9802a836e13168ebc72b30f36d.tar.gz emacs-fc6fef68692d1a9802a836e13168ebc72b30f36d.tar.bz2 emacs-fc6fef68692d1a9802a836e13168ebc72b30f36d.zip |
Silence byte-compiler on Emacs 25
Emacs 25 defined a global variable `features', which triggers a
warning "Lexical argument shadows the dynamic variable features".
That's not `use-package's fault, but we should suppress the warning
anyway, so that there is no additional noise that would cause us to
potentially overlook warnings that absolutely have to be addressed.
Diffstat (limited to 'lisp/use-package')
-rw-r--r-- | lisp/use-package/use-package-core.el | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 525b478313b..51746b3fff6 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -1315,41 +1315,41 @@ meaning: args (list args))) -(defun use-package-after-count-uses (features) +(defun use-package-after-count-uses (features*) "Count the number of time the body would appear in the result." - (cond ((use-package-non-nil-symbolp features) + (cond ((use-package-non-nil-symbolp features*) 1) - ((and (consp features) - (memq (car features) '(:or :any))) + ((and (consp features*) + (memq (car features*) '(:or :any))) (let ((num 0)) - (cl-dolist (next (cdr features)) + (cl-dolist (next (cdr features*)) (setq num (+ num (use-package-after-count-uses next)))) num)) - ((and (consp features) - (memq (car features) '(:and :all))) + ((and (consp features*) + (memq (car features*) '(:and :all))) (apply #'max (mapcar #'use-package-after-count-uses - (cdr features)))) - ((listp features) - (use-package-after-count-uses (cons :all features))))) + (cdr features*)))) + ((listp features*) + (use-package-after-count-uses (cons :all features*))))) -(defun use-package-require-after-load (features body) - "Generate `eval-after-load' statements to represents FEATURES. -FEATURES is a list containing keywords `:and' and `:all', where +(defun use-package-require-after-load (features* body) + "Generate `eval-after-load' statements to represents FEATURES*. +FEATURES* is a list containing keywords `:and' and `:all', where no keyword implies `:all'." (cond - ((use-package-non-nil-symbolp features) - `((eval-after-load ',features ',(macroexp-progn body)))) - ((and (consp features) - (memq (car features) '(:or :any))) + ((use-package-non-nil-symbolp features*) + `((eval-after-load ',features* ',(macroexp-progn body)))) + ((and (consp features*) + (memq (car features*) '(:or :any))) (cl-mapcan #'(lambda (x) (use-package-require-after-load x body)) - (cdr features))) - ((and (consp features) - (memq (car features) '(:and :all))) - (cl-dolist (next (cdr features)) + (cdr features*))) + ((and (consp features*) + (memq (car features*) '(:and :all))) + (cl-dolist (next (cdr features*)) (setq body (use-package-require-after-load next body))) body) - ((listp features) - (use-package-require-after-load (cons :all features) body)))) + ((listp features*) + (use-package-require-after-load (cons :all features*) body)))) (defun use-package-handler/:after (name _keyword arg rest state) (let ((body (use-package-process-keywords name rest state)) |