Bytecompiler bytecompiler, won't you shut up

This commit is contained in:
Henrik Lissner 2019-11-23 00:52:36 -05:00
parent 803da8b3b9
commit 26c8f5c6ef
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
21 changed files with 31 additions and 28 deletions

View file

@ -113,7 +113,7 @@ Warning: freezes indefinitely on any stdin prompt."
:connection-type 'pipe)) :connection-type 'pipe))
done-p) done-p)
(set-process-filter (set-process-filter
process (lambda (process output) process (lambda (_process output)
(princ output (current-buffer)) (princ output (current-buffer))
(princ output))) (princ output)))
(set-process-sentinel (set-process-sentinel

View file

@ -178,6 +178,7 @@ single file or nested compound statement of `and' and `or' statements."
file)) file))
(nth 7 (file-attributes file)))) (nth 7 (file-attributes file))))
(defvar w32-get-true-file-attributes)
;;;###autoload ;;;###autoload
(defun doom-directory-size (dir) (defun doom-directory-size (dir)
"Returns the size of FILE (in DIR) in kilobytes." "Returns the size of FILE (in DIR) in kilobytes."

View file

@ -43,7 +43,6 @@
(print! (bold "Options:")) (print! (bold "Options:"))
(print-group! (print-group!
(cl-loop for opt in optlist (cl-loop for opt in optlist
for flags = (doom-cli-option-flags opt)
for desc = (doom-cli-option-desc opt) for desc = (doom-cli-option-desc opt)
for args = (doom-cli-option-args opt) for args = (doom-cli-option-args opt)
for flagstr = (string-join (doom-cli-option-flags opt) ", ") for flagstr = (string-join (doom-cli-option-flags opt) ", ")

View file

@ -5,7 +5,7 @@
(noenv-p ["--no-env"] "Don't generate an envvars file (see 'doom help env')") (noenv-p ["--no-env"] "Don't generate an envvars file (see 'doom help env')")
(noinstall-p ["--no-install"] "Don't auto-install packages") (noinstall-p ["--no-install"] "Don't auto-install packages")
(nofonts-p ["--no-fonts"] "Don't install (or prompt to install) all-the-icons fonts") (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. "Installs and sets up Doom Emacs for the first time.
This command does the following: This command does the following:

View file

@ -13,7 +13,7 @@
:bare t :bare t
(doom-initialize 'force) (doom-initialize 'force)
(require 'ansi-color) (require 'ansi-color)
(let (files error read-files) (let (files read-files)
(unless targets (unless targets
(setq targets (setq targets
(cons doom-core-dir (cons doom-core-dir

View file

@ -187,6 +187,7 @@ BODY will be run when this dispatcher is called."
:plist plist :plist plist
:fn :fn
(lambda (--alist--) (lambda (--alist--)
(ignore --alist--)
(let ,(cl-loop for opt in speclist (let ,(cl-loop for opt in speclist
for optsym = (if (listp opt) (car opt) opt) for optsym = (if (listp opt) (car opt) opt)
unless (memq optsym cl--lambda-list-keywords) unless (memq optsym cl--lambda-list-keywords)

View file

@ -158,9 +158,9 @@ more information on modifiers."
;; HACK This ping-ponging between the destination and source windows is to ;; HACK This ping-ponging between the destination and source windows is to
;; update the window focus history, so that, if you close either split ;; update the window focus history, so that, if you close either split
;; afterwards you won't be sent to some random window. ;; afterwards you won't be sent to some random window.
(let* ((doom-inhibit-switch-window-hooks t) (let ((doom-inhibit-switch-window-hooks t)
(origwin (selected-window)) (origwin (selected-window)))
(win (select-window (split-window origwin count 'below)))) (select-window (split-window origwin count 'below))
(unless evil-split-window-below (unless evil-split-window-below
(select-window origwin)) (select-window origwin))
(run-hooks 'doom-switch-window-hook)) (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 ;; HACK This ping-ponging between the destination and source windows is to
;; update the window focus history, so that, if you close either split ;; update the window focus history, so that, if you close either split
;; afterwards you won't be sent to some random window. ;; afterwards you won't be sent to some random window.
(let* ((doom-inhibit-switch-window-hooks t) (let ((doom-inhibit-switch-window-hooks t)
(origwin (selected-window)) (origwin (selected-window)))
(win (select-window (split-window origwin count 'right)))) (select-window (split-window origwin count 'right))
(unless evil-vsplit-window-right (unless evil-vsplit-window-right
(select-window origwin)) (select-window origwin))
(run-hooks 'doom-switch-window-hook)) (run-hooks 'doom-switch-window-hook))

View file

@ -149,7 +149,7 @@ Widens narrowed buffers first. If BANG, use indirect buffer clones instead."
(doom/narrow-buffer-indirectly beg end))) (doom/narrow-buffer-indirectly beg end)))
;;;###autoload (autoload '+evil:yank-unindented "editor/evil/autoload/evil" nil t) ;;;###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." "Saves the (reindented) characters in motion into the kill-ring."
:move-point nil :move-point nil
:repeat nil :repeat nil

View file

@ -1,12 +1,12 @@
;;; editor/evil/autoload/textobjects.el -*- lexical-binding: t; -*- ;;; editor/evil/autoload/textobjects.el -*- lexical-binding: t; -*-
;;;###autoload (autoload '+evil:whole-buffer-txtobj "editor/evil/autoload/textobjects" nil nil) ;;;###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." "Text object to select the whole buffer."
(evil-range (point-min) (point-max) type)) (evil-range (point-min) (point-max) type))
;;;###autoload (autoload '+evil:defun-txtobj "editor/evil/autoload/textobjects" nil nil) ;;;###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." "Text object to select the whole buffer."
(cl-destructuring-bind (beg . end) (cl-destructuring-bind (beg . end)
(bounds-of-thing-at-point 'defun) (bounds-of-thing-at-point 'defun)

View file

@ -128,7 +128,7 @@ directives. By default, this only recognizes C directives.")
(save-excursion (apply orig-fn args))) (save-excursion (apply orig-fn args)))
;; In evil, registers 2-9 are buffer-local. In vim, they're global, so... ;; 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 :after-until #'evil-global-marker-p
(and (>= char ?2) (<= char ?9))) (and (>= char ?2) (<= char ?9)))

View file

@ -6,6 +6,7 @@
(defvar +word-wrap--enable-visual-line-mode nil) (defvar +word-wrap--enable-visual-line-mode nil)
(defvar +word-wrap--major-mode-indent-var 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) (defun +word-wrap--adjust-extra-indent-a (orig-fn beg end)
"Contextually adjust extra word-wrap indentation." "Contextually adjust extra word-wrap indentation."
(let ((adaptive-wrap-extra-indent (+word-wrap--calc-extra-indent beg))) (let ((adaptive-wrap-extra-indent (+word-wrap--calc-extra-indent beg)))

View file

@ -40,7 +40,7 @@
(file-size-human-readable (buffer-size))) (file-size-human-readable (buffer-size)))
(when (featurep! :completion ivy) (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'." "Use `counsel-find-file' instead of `find-file'."
:override #'ibuffer-find-file :override #'ibuffer-find-file
(interactive) (interactive)

View file

@ -11,6 +11,7 @@
(format "https://%s/%s" (car remote-info) (cadr remote-info)) (format "https://%s/%s" (car remote-info) (cadr remote-info))
(error "Remote `%s' is unknown or contains an unsupported URL" remote)))) (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-open-in-browser)
(defvar git-link-use-commit) (defvar git-link-use-commit)
;;;###autoload ;;;###autoload

View file

@ -134,7 +134,7 @@ project."
(+org--capture-ensure-heading (cdr headings) (1+ initial-level))))) (+org--capture-ensure-heading (cdr headings) (1+ initial-level)))))
(defun +org--capture-central-file (file project) (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)) (set-buffer (org-capture-target-buffer file))
(org-capture-put-target-region-and-position) (org-capture-put-target-region-and-position)
(widen) (widen)

View file

@ -59,6 +59,6 @@
(user-error "No saved location to refile to")) (user-error "No saved location to refile to"))
(let ((org-refile-keep arg) (let ((org-refile-keep arg)
(completing-read-function (completing-read-function
(lambda (_p coll _pred _rm _ii _h default &rest _) (lambda (_p _coll _pred _rm _ii _h default &rest _)
default))) default)))
(org-refile))) (org-refile)))

View file

@ -68,8 +68,7 @@
1))) 1)))
(pcase direction (pcase direction
(`below (`below
(let ((at-eol (>= (point) (1- (line-end-position)))) (let (org-insert-heading-respect-content)
org-insert-heading-respect-content)
(goto-char (line-end-position)) (goto-char (line-end-position))
(org-end-of-subtree) (org-end-of-subtree)
(insert "\n" (make-string level ?*) " "))) (insert "\n" (make-string level ?*) " ")))

View file

@ -140,9 +140,10 @@ background (and foreground) match the current theme."
;; HACK Face specs fed directly to `org-todo-keyword-faces' don't respect ;; 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 ;; underlying faces like the `org-todo' face does, so we define our own
;; intermediary faces that extend from org-todo. ;; intermediary faces that extend from org-todo.
(custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "") (with-no-warnings
(custom-declare-face '+org-todo-project '((t (:inherit (bold font-lock-doc-face org-todo)))) "") (custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "")
(custom-declare-face '+org-todo-onhold '((t (:inherit (bold warning 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 (setq org-todo-keywords
'((sequence '((sequence
"TODO(t)" ; A task that needs doing & is ready to do "TODO(t)" ; A task that needs doing & is ready to do

View file

@ -4,10 +4,10 @@
(defun eshell/emacs (&rest files) (defun eshell/emacs (&rest files)
"Open a FILES in Emacs. "Open a FILES in Emacs.
For folks with a habit of using \"emacs\" to open files, even in eshell." For folks with a habit of using \"emacs\" to open files, even in eshell."
(if args (if files
(mapc #'find-file (mapc #'find-file
(mapcar #'expand-file-name (mapcar #'expand-file-name
(eshell-flatten-list (reverse args)))) (eshell-flatten-list (reverse files))))
(bury-buffer))) (bury-buffer)))
;;;###autoload ;;;###autoload
(defalias 'eshell/e #'eshell/emacs) (defalias 'eshell/e #'eshell/emacs)

View file

@ -1,7 +1,7 @@
;;; tools/eval/autoload/eval.el -*- lexical-binding: t; -*- ;;; tools/eval/autoload/eval.el -*- lexical-binding: t; -*-
;;;###autoload ;;;###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." "Display OUTPUT in a popup buffer."
(if (with-temp-buffer (if (with-temp-buffer
(insert output) (insert output)

View file

@ -16,8 +16,8 @@
(+eval/region-and-replace beg end)) (+eval/region-and-replace beg end))
;;;###autoload (autoload '+eval:repl "tools/eval/autoload/evil" nil t) ;;;###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." "Open REPL and send the current selection to it."
:move-point nil :move-point nil
(interactive "<r><!>") (interactive "<r>")
(+eval/open-repl-other-window)) (+eval/open-repl-other-window))

View file

@ -49,7 +49,7 @@
buffer))) buffer)))
(defun +eval-open-repl (prompt-p &optional displayfn) (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) (or (assq major-mode +eval-repls)
(list)) (list))
(when (or (not fn) prompt-p) (when (or (not fn) prompt-p)