From 26c8f5c6ef79c8dfe2126447c9b117bd16adf298 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 00:52:36 -0500 Subject: [PATCH] Bytecompiler bytecompiler, won't you shut up --- core/autoload/cli.el | 2 +- core/autoload/files.el | 1 + core/cli/help.el | 1 - core/cli/install.el | 2 +- core/cli/test.el | 2 +- core/core-cli.el | 1 + modules/editor/evil/autoload/advice.el | 12 ++++++------ modules/editor/evil/autoload/evil.el | 2 +- modules/editor/evil/autoload/textobjects.el | 4 ++-- modules/editor/evil/config.el | 2 +- modules/editor/word-wrap/autoload.el | 1 + modules/emacs/ibuffer/config.el | 2 +- modules/emacs/vc/autoload/vc.el | 1 + modules/lang/org/autoload/org-capture.el | 2 +- modules/lang/org/autoload/org-refile.el | 2 +- modules/lang/org/autoload/org.el | 3 +-- modules/lang/org/config.el | 7 ++++--- modules/term/eshell/autoload/commands.el | 4 ++-- modules/tools/eval/autoload/eval.el | 2 +- modules/tools/eval/autoload/evil.el | 4 ++-- modules/tools/eval/autoload/repl.el | 2 +- 21 files changed, 31 insertions(+), 28 deletions(-) diff --git a/core/autoload/cli.el b/core/autoload/cli.el index 59f5e9457..e7f45c810 100644 --- a/core/autoload/cli.el +++ b/core/autoload/cli.el @@ -113,7 +113,7 @@ Warning: freezes indefinitely on any stdin prompt." :connection-type 'pipe)) done-p) (set-process-filter - process (lambda (process output) + process (lambda (_process output) (princ output (current-buffer)) (princ output))) (set-process-sentinel diff --git a/core/autoload/files.el b/core/autoload/files.el index fd48fa0e7..f7cd34741 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -178,6 +178,7 @@ single file or nested compound statement of `and' and `or' statements." file)) (nth 7 (file-attributes file)))) +(defvar w32-get-true-file-attributes) ;;;###autoload (defun doom-directory-size (dir) "Returns the size of FILE (in DIR) in kilobytes." diff --git a/core/cli/help.el b/core/cli/help.el index 13e82ea77..2517a47b7 100644 --- a/core/cli/help.el +++ b/core/cli/help.el @@ -43,7 +43,6 @@ (print! (bold "Options:")) (print-group! (cl-loop for opt in optlist - for flags = (doom-cli-option-flags opt) for desc = (doom-cli-option-desc opt) for args = (doom-cli-option-args opt) for flagstr = (string-join (doom-cli-option-flags opt) ", ") diff --git a/core/cli/install.el b/core/cli/install.el index f4bf12126..e99ef25b0 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -5,7 +5,7 @@ (noenv-p ["--no-env"] "Don't generate an envvars file (see 'doom help env')") (noinstall-p ["--no-install"] "Don't auto-install packages") (nofonts-p ["--no-fonts"] "Don't install (or prompt to install) all-the-icons fonts") - &rest args) + &rest _args) "Installs and sets up Doom Emacs for the first time. This command does the following: diff --git a/core/cli/test.el b/core/cli/test.el index 4def753a3..d42c22045 100644 --- a/core/cli/test.el +++ b/core/cli/test.el @@ -13,7 +13,7 @@ :bare t (doom-initialize 'force) (require 'ansi-color) - (let (files error read-files) + (let (files read-files) (unless targets (setq targets (cons doom-core-dir diff --git a/core/core-cli.el b/core/core-cli.el index cbe938dd0..a58c6d073 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -187,6 +187,7 @@ BODY will be run when this dispatcher is called." :plist plist :fn (lambda (--alist--) + (ignore --alist--) (let ,(cl-loop for opt in speclist for optsym = (if (listp opt) (car opt) opt) unless (memq optsym cl--lambda-list-keywords) diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index 651393858..d1aed1b1b 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -158,9 +158,9 @@ more information on modifiers." ;; HACK This ping-ponging between the destination and source windows is to ;; update the window focus history, so that, if you close either split ;; afterwards you won't be sent to some random window. - (let* ((doom-inhibit-switch-window-hooks t) - (origwin (selected-window)) - (win (select-window (split-window origwin count 'below)))) + (let ((doom-inhibit-switch-window-hooks t) + (origwin (selected-window))) + (select-window (split-window origwin count 'below)) (unless evil-split-window-below (select-window origwin)) (run-hooks 'doom-switch-window-hook)) @@ -177,9 +177,9 @@ more information on modifiers." ;; HACK This ping-ponging between the destination and source windows is to ;; update the window focus history, so that, if you close either split ;; afterwards you won't be sent to some random window. - (let* ((doom-inhibit-switch-window-hooks t) - (origwin (selected-window)) - (win (select-window (split-window origwin count 'right)))) + (let ((doom-inhibit-switch-window-hooks t) + (origwin (selected-window))) + (select-window (split-window origwin count 'right)) (unless evil-vsplit-window-right (select-window origwin)) (run-hooks 'doom-switch-window-hook)) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index a6548357a..ccbdebfdf 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -149,7 +149,7 @@ Widens narrowed buffers first. If BANG, use indirect buffer clones instead." (doom/narrow-buffer-indirectly beg end))) ;;;###autoload (autoload '+evil:yank-unindented "editor/evil/autoload/evil" nil t) -(evil-define-operator +evil:yank-unindented (beg end type register yank-handler) +(evil-define-operator +evil:yank-unindented (beg end _type _register _yank-handler) "Saves the (reindented) characters in motion into the kill-ring." :move-point nil :repeat nil diff --git a/modules/editor/evil/autoload/textobjects.el b/modules/editor/evil/autoload/textobjects.el index 6c7028bd6..bdadf229c 100644 --- a/modules/editor/evil/autoload/textobjects.el +++ b/modules/editor/evil/autoload/textobjects.el @@ -1,12 +1,12 @@ ;;; editor/evil/autoload/textobjects.el -*- lexical-binding: t; -*- ;;;###autoload (autoload '+evil:whole-buffer-txtobj "editor/evil/autoload/textobjects" nil nil) -(evil-define-text-object +evil:whole-buffer-txtobj (_count &optional _beg _end type) +(evil-define-text-object +evil:whole-buffer-txtobj (count &optional _beg _end type) "Text object to select the whole buffer." (evil-range (point-min) (point-max) type)) ;;;###autoload (autoload '+evil:defun-txtobj "editor/evil/autoload/textobjects" nil nil) -(evil-define-text-object +evil:defun-txtobj (_count &optional _beg _end type) +(evil-define-text-object +evil:defun-txtobj (count &optional _beg _end type) "Text object to select the whole buffer." (cl-destructuring-bind (beg . end) (bounds-of-thing-at-point 'defun) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 0873bea44..9d26bb57d 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -128,7 +128,7 @@ directives. By default, this only recognizes C directives.") (save-excursion (apply orig-fn args))) ;; In evil, registers 2-9 are buffer-local. In vim, they're global, so... - (defadvice! +evil--make-numbered-markers-global-a (arg) + (defadvice! +evil--make-numbered-markers-global-a (_arg) :after-until #'evil-global-marker-p (and (>= char ?2) (<= char ?9))) diff --git a/modules/editor/word-wrap/autoload.el b/modules/editor/word-wrap/autoload.el index 53bec3372..5e1b95ed8 100644 --- a/modules/editor/word-wrap/autoload.el +++ b/modules/editor/word-wrap/autoload.el @@ -6,6 +6,7 @@ (defvar +word-wrap--enable-visual-line-mode nil) (defvar +word-wrap--major-mode-indent-var nil) +(defvar adaptive-wrap-extra-indent) (defun +word-wrap--adjust-extra-indent-a (orig-fn beg end) "Contextually adjust extra word-wrap indentation." (let ((adaptive-wrap-extra-indent (+word-wrap--calc-extra-indent beg))) diff --git a/modules/emacs/ibuffer/config.el b/modules/emacs/ibuffer/config.el index 72755c9d3..653ee52b2 100644 --- a/modules/emacs/ibuffer/config.el +++ b/modules/emacs/ibuffer/config.el @@ -40,7 +40,7 @@ (file-size-human-readable (buffer-size))) (when (featurep! :completion ivy) - (defadvice! +ibuffer-use-counsel-maybe-a (file &optional wildcards) + (defadvice! +ibuffer-use-counsel-maybe-a (_file &optional _wildcards) "Use `counsel-find-file' instead of `find-file'." :override #'ibuffer-find-file (interactive) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index f0a4a8096..c91328d6c 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -11,6 +11,7 @@ (format "https://%s/%s" (car remote-info) (cadr remote-info)) (error "Remote `%s' is unknown or contains an unsupported URL" remote)))) +(defvar git-link-default-branch) (defvar git-link-open-in-browser) (defvar git-link-use-commit) ;;;###autoload diff --git a/modules/lang/org/autoload/org-capture.el b/modules/lang/org/autoload/org-capture.el index 4707fab75..f054ede13 100644 --- a/modules/lang/org/autoload/org-capture.el +++ b/modules/lang/org/autoload/org-capture.el @@ -134,7 +134,7 @@ project." (+org--capture-ensure-heading (cdr headings) (1+ initial-level))))) (defun +org--capture-central-file (file project) - (let ((file (expand-file-name +org-capture-projects-file org-directory))) + (let ((file (expand-file-name file org-directory))) (set-buffer (org-capture-target-buffer file)) (org-capture-put-target-region-and-position) (widen) diff --git a/modules/lang/org/autoload/org-refile.el b/modules/lang/org/autoload/org-refile.el index 089484206..5f2a50457 100644 --- a/modules/lang/org/autoload/org-refile.el +++ b/modules/lang/org/autoload/org-refile.el @@ -59,6 +59,6 @@ (user-error "No saved location to refile to")) (let ((org-refile-keep arg) (completing-read-function - (lambda (_p coll _pred _rm _ii _h default &rest _) + (lambda (_p _coll _pred _rm _ii _h default &rest _) default))) (org-refile))) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 88241662f..2d14b5c28 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -68,8 +68,7 @@ 1))) (pcase direction (`below - (let ((at-eol (>= (point) (1- (line-end-position)))) - org-insert-heading-respect-content) + (let (org-insert-heading-respect-content) (goto-char (line-end-position)) (org-end-of-subtree) (insert "\n" (make-string level ?*) " "))) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2492491b3..9f1e7d121 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -140,9 +140,10 @@ background (and foreground) match the current theme." ;; HACK Face specs fed directly to `org-todo-keyword-faces' don't respect ;; underlying faces like the `org-todo' face does, so we define our own ;; intermediary faces that extend from org-todo. - (custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "") - (custom-declare-face '+org-todo-project '((t (:inherit (bold font-lock-doc-face org-todo)))) "") - (custom-declare-face '+org-todo-onhold '((t (:inherit (bold warning org-todo)))) "") + (with-no-warnings + (custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "") + (custom-declare-face '+org-todo-project '((t (:inherit (bold font-lock-doc-face org-todo)))) "") + (custom-declare-face '+org-todo-onhold '((t (:inherit (bold warning org-todo)))) "")) (setq org-todo-keywords '((sequence "TODO(t)" ; A task that needs doing & is ready to do diff --git a/modules/term/eshell/autoload/commands.el b/modules/term/eshell/autoload/commands.el index efb706ec6..1225270a0 100644 --- a/modules/term/eshell/autoload/commands.el +++ b/modules/term/eshell/autoload/commands.el @@ -4,10 +4,10 @@ (defun eshell/emacs (&rest files) "Open a FILES in Emacs. For folks with a habit of using \"emacs\" to open files, even in eshell." - (if args + (if files (mapc #'find-file (mapcar #'expand-file-name - (eshell-flatten-list (reverse args)))) + (eshell-flatten-list (reverse files)))) (bury-buffer))) ;;;###autoload (defalias 'eshell/e #'eshell/emacs) diff --git a/modules/tools/eval/autoload/eval.el b/modules/tools/eval/autoload/eval.el index 41be372c4..b4a640474 100644 --- a/modules/tools/eval/autoload/eval.el +++ b/modules/tools/eval/autoload/eval.el @@ -1,7 +1,7 @@ ;;; tools/eval/autoload/eval.el -*- lexical-binding: t; -*- ;;;###autoload -(defun +eval-display-results-in-popup (output &optional source-buffer) +(defun +eval-display-results-in-popup (output &optional _source-buffer) "Display OUTPUT in a popup buffer." (if (with-temp-buffer (insert output) diff --git a/modules/tools/eval/autoload/evil.el b/modules/tools/eval/autoload/evil.el index 218b12ce6..13085c6bc 100644 --- a/modules/tools/eval/autoload/evil.el +++ b/modules/tools/eval/autoload/evil.el @@ -16,8 +16,8 @@ (+eval/region-and-replace beg end)) ;;;###autoload (autoload '+eval:repl "tools/eval/autoload/evil" nil t) -(evil-define-operator +eval:repl (beg end &optional bang) +(evil-define-operator +eval:repl (_beg _end) "Open REPL and send the current selection to it." :move-point nil - (interactive "") + (interactive "") (+eval/open-repl-other-window)) diff --git a/modules/tools/eval/autoload/repl.el b/modules/tools/eval/autoload/repl.el index 7db09a522..3cf83a8c2 100644 --- a/modules/tools/eval/autoload/repl.el +++ b/modules/tools/eval/autoload/repl.el @@ -49,7 +49,7 @@ buffer))) (defun +eval-open-repl (prompt-p &optional displayfn) - (cl-destructuring-bind (mode fn . plist) + (cl-destructuring-bind (_mode fn . plist) (or (assq major-mode +eval-repls) (list)) (when (or (not fn) prompt-p)