fix: appease byte-compiler across the board

Warnings about unused lexical variables, arity warnings, unescaped
single quotes in docstrings, shadowed variables, and invalid value for
:local depending on Emacs version.
This commit is contained in:
Henrik Lissner 2026-03-11 19:47:08 -04:00
parent c1928bf081
commit 73d643da83
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
24 changed files with 135 additions and 104 deletions

View file

@ -102,7 +102,7 @@ libraries. It is the equivalent of the following shell commands:
(sh! "git" "branch" "-D" target-remote)
(sh! "git" "remote" "remove" doom-upgrade-remote)
(unwind-protect
(let (result)
(progn
(or (zerop (car (sh! "git" "remote" "add" doom-upgrade-remote doom-upgrade-url)))
(error "Failed to add %s to remotes" doom-upgrade-remote))
(or (zerop (car (setq result (sh! "git" "fetch" "--force" "--tags" doom-upgrade-remote (format "%s:%s" branch target-remote)))))

View file

@ -977,7 +977,7 @@ considered as well."
(save-excursion
(goto-char (point-max))
(buffer-substring (if (re-search-backward "^\\[Return code: 0\\]$" nil t)
(point-at-bol 2)
(pos-bol 2)
(point-min))
(point-max))))))
(error-file (doom-cli--output-file 'error context)))
@ -2122,7 +2122,7 @@ substring is edited more than once."
(format (format "%%-%ds%%s%%%ds" width width)
"DOOM(1)" title "DOOM(1)")))
("NAME" . ,(concat .command " - " .summary))
("SYNOPSIS" . ,(doom-cli-help--render-synopsis .synopsis nil t))
("SYNOPSIS" . ,(doom-cli-help--render-synopsis .synopsis))
("DESCRIPTION" . ,.description))
`((nil . ,(doom-cli-help--render-synopsis .synopsis "Usage: "))
(nil . ,(string-join (seq-remove #'string-empty-p (list .summary .description))
@ -2398,7 +2398,7 @@ Recognizes %p (for the prefix) and %c (for the active command).")
((doom-cli-find (list prefix)))))
(terpri)
;; Kill manually so we don't save output to logs.
(let (kill-emacs) (kill-emacs 0))))
(let (kill-emacs-hook) (kill-emacs 0))))
(defcli! (:root :help)
((localonly? ("-g" "--no-global") "Hide global options")

View file

@ -393,7 +393,7 @@ files, so this replace calls to `pp' with the much faster `prin1'."
(use-package! server
:when (display-graphic-p)
:after-call doom-first-input-hook doom-first-file-hook focus-out-hook
:after-call doom-first-input-hook doom-first-file-hook
:defer 1
:config
(when-let* ((name (getenv "EMACS_SERVER_NAME")))
@ -531,7 +531,7 @@ on."
(defun doom-disable-smartparens-mode-maybe-h ()
(when smartparens-mode
(setq-local doom-buffer-smartparens-mode t)
(turn-off-smartparens-mode)))))
(smartparens-mode -1)))))
(use-package! so-long

View file

@ -275,7 +275,7 @@ localleader prefix."
(defun doom--map-keyword-to-states (keyword)
"Convert a KEYWORD into a list of evil state symbols.
For example, :nvi will map to (list 'normal 'visual 'insert). See
For example, :nvi will map to (list \\='normal \\='visual \\='insert). See
`doom-evil-state-alist' to customize this."
(cl-loop for l across (doom-keyword-name keyword)
if (assq l doom-evil-state-alist) collect (cdr it)

View file

@ -206,7 +206,7 @@ Return non-nil if loading the file succeeds."
(defun doom-require (feature &optional filename noerror)
"Like `require', but handles and enhances Doom errors.
Can also load Doom's subfeatures, e.g. (doom-require 'doom-lib 'files)"
Can also load Doom's subfeatures, e.g. (doom-require \\='doom-lib \\='files)"
(let ((subfeature (if (symbolp filename) filename)))
(or (featurep feature subfeature)
(doom-load
@ -622,14 +622,15 @@ or aliases."
(declare (doc-string 1))
`(lambda (&rest _) (interactive) ,@body))
(defmacro cmd!! (command &optional prefix-arg &rest args)
(defmacro cmd!! (command &optional arg &rest args)
"Returns a closure that interactively calls COMMAND with ARGS and PREFIX-ARG.
Like `cmd!', but allows you to change `current-prefix-arg' or pass arguments to
COMMAND. This macro is meant to be used as a target for keybinds (e.g. with
`define-key' or `map!')."
(declare (doc-string 1) (pure t) (side-effect-free t))
`(lambda (arg &rest _) (interactive "P")
(let ((current-prefix-arg (or ,prefix-arg arg)))
(let ((current-prefix-arg (or ,arg arg)))
(,(if args
#'funcall-interactively
#'call-interactively)
@ -1633,11 +1634,11 @@ Accepts the following properties:
:built-in BOOL|'prefer
Same as :ignore if the package is a built-in Emacs package. This is more to
inform help commands like `doom/help-packages' that this is a built-in
package. If set to 'prefer, the package will not be installed if it is
package. If set to \\='prefer, the package will not be installed if it is
already provided by Emacs.
:env ALIST
Parameters and envvars to set while the package is building. If these values
change, the package will be rebuilt on next 'doom sync'.
change, the package will be rebuilt on next \\='doom sync'.
Returns t if package is successfully registered, and nil if it was disabled
elsewhere."

View file

@ -234,7 +234,7 @@ state are passed in.")
on-exit)
"Define a project minor mode named NAME and where/how it is activated.
Project modes allow you to configure 'sub-modes' for major-modes that are
Project modes allow you to configure \\='sub-modes' for major-modes that are
specific to a folder, project structure, framework or whatever arbitrary context
you define. These project modes can have their own settings, keymaps, hooks,
snippets, etc.

View file

@ -8,19 +8,16 @@
(defcustom doom-first-input-hook ()
"Transient hooks run before the first user input."
:type 'hook
:local 'permanent-local
:group 'doom)
(defcustom doom-first-file-hook ()
"Transient hooks run before the first interactively opened file."
:type 'hook
:local 'permanent-local
:group 'doom)
(defcustom doom-first-buffer-hook ()
"Transient hooks run before the first interactively opened buffer."
:type 'hook
:local 'permanent-local
:group 'doom)
@ -191,7 +188,7 @@ sub-packages. For example, `org' is comprised of many packages, and might be
broken up into:
(doom-load-packages-incrementally
'(calendar find-func format-spec org-macs org-compat
\\='(calendar find-func format-spec org-macs org-compat
org-faces org-entities org-list org-pcomplete org-src
org-footnote org-macro ob org org-clock org-agenda
org-capture))

View file

@ -179,9 +179,9 @@ original state.")
(and (bound-and-true-p doom-cli--context)
(doom-cli-context-suppress-prompts-p doom-cli--context)))
(defadvice! doom-straight--fallback-to-tty-prompt-a (fn prompt actions)
(defadvice! doom-straight--fallback-to-tty-prompt-a (prompt actions)
"Modifies straight to prompt on the terminal when in noninteractive sessions."
:around #'straight--popup-raw
:override #'straight--popup-raw
(if (bound-and-true-p async-in-child-emacs)
(error "Straight prompt: %s" prompt)
(let ((doom-straight--auto-options doom-straight--auto-options))
@ -231,7 +231,7 @@ original state.")
", ")
(if (not recommended) ""
(format "; don't know? Pick %d" (1+ recommended)))))
answer fn)
answer)
(while (null (nth (setq answer (1- (read-number prompt))) options))
(print! (warn "%s is not a valid answer, try again.") answer))
(funcall (nth answer options)))))))))

View file

@ -12,7 +12,9 @@ Is either a symbol representing the name of an Emacs theme, or a list thereof
(to enable in order).
Set to `nil' to load no theme at all. This variable is changed by `load-theme'
and `enable-theme'.")
and `enable-theme'."
:type '(choice theme (repeat theme))
:group 'doom)
(defcustom doom-font nil
"The default font to use.
@ -23,31 +25,38 @@ This affects the `default' and `fixed-pitch' faces.
Examples:
(setq doom-font (font-spec :family \"Fira Mono\" :size 12))
(setq doom-font \"Terminus (TTF):pixelsize=12:antialias=off\")
(setq doom-font \"Fira Code-14\")")
(setq doom-font \"Fira Code-14\")"
:type 'font
:group 'doom)
(defcustom doom-variable-pitch-font nil
"The default font to use for variable-pitch text.
Must be a `font-spec', a font object, an XFT font string, or an XLFD string. See
`doom-font' for examples.
An omitted font size means to inherit `doom-font''s size.")
An omitted font size means to inherit `doom-font''s size."
:type 'font
:group 'doom)
(defcustom doom-serif-font nil
"The default font to use for the `fixed-pitch-serif' face.
Must be a `font-spec', a font object, an XFT font string, or an XLFD string. See
`doom-font' for examples.
An omitted font size means to inherit `doom-font''s size.")
An omitted font size means to inherit `doom-font''s size."
:type 'font
:group 'doom)
(define-obsolete-variable-alias 'doom-unicode-font 'doom-symbol-font "3.0.0")
(defcustom doom-symbol-font nil
"Fallback font for symbols.
Must be a `font-spec', a font object, an XFT font string, or an XLFD string. See
`doom-font' for examples. Emacs defaults to Symbola.
WARNING: if you specify a size for this font it will hard-lock any usage of this
font to that size. It's rarely a good idea to do so!")
(define-obsolete-variable-alias 'doom-unicode-font 'doom-symbol-font "3.0.0")
font to that size. It's rarely a good idea to do so!"
:type 'font
:group 'doom)
(defcustom doom-emoji-font nil
"Fallback font for emoji.
@ -55,43 +64,57 @@ Must be a `font-spec', a font object, an XFT font string, or an XLFD string. See
`doom-font' for examples.
WARNING: if you specify a size for this font it will hard-lock any usage of this
font to that size. It's rarely a good idea to do so!")
font to that size. It's rarely a good idea to do so!"
:type 'font
:group 'doom)
(defconst doom-emoji-fallback-font-families
(defcustom doom-emoji-fallback-font-families
'("Apple Color Emoji"
"Segoe UI Emoji"
"Noto Color Emoji"
"Noto Emoji")
"A list of fallback font families to use for emojis.
These are platform-specific fallbacks for internal use. If you
want to change your emoji font, use `doom-emoji-font'.")
want to change your emoji font, use `doom-emoji-font'."
:type '(repeat font)
:group 'doom)
(defconst doom-symbol-fallback-font-families
(defcustom doom-symbol-fallback-font-families
'("Segoe UI Symbol"
"Apple Symbols")
"A list of fallback font families for general symbol glyphs.
These are platform-specific fallbacks for internal use. If you
want to change your symbol font, use `doom-symbol-font'.")
want to change your symbol font, use `doom-symbol-font'."
:type '(repeat font)
:group 'doom)
;;
;;; Custom hooks
(defcustom doom-init-ui-hook nil
"List of hooks to run when the UI has been initialized.")
"List of hooks to run when the UI has been initialized."
:type 'hook
:group 'doom)
(defcustom doom-load-theme-hook nil
"Hook run after a color-scheme is loaded.
Triggered by `load-theme', `enable-theme', or reloaded with `doom/reload-theme',
but only for themes that declare themselves as a :kind color-scheme (which Doom
treats as the default).")
treats as the default)."
:type 'hook
:group 'doom)
(defcustom doom-switch-buffer-hook nil
"A list of hooks run after changing the current buffer.")
"A list of hooks run after changing the current buffer."
:type 'hook
:group 'doom)
(defcustom doom-switch-window-hook nil
"A list of hooks run after changing the focused windows.")
"A list of hooks run after changing the focused windows."
:type 'hook
:group 'doom)
(defcustom doom-switch-frame-hook nil
"A list of hooks run after changing the focused frame.
@ -100,7 +123,9 @@ This also serves as an analog for `focus-in-hook' or
`after-focus-change-function', but also preforms debouncing (see
`doom-switch-frame-hook-debounce-delay'). It's possible for this hook to be
triggered multiple times (because there are edge cases where Emacs can have
multiple frames focused at once).")
multiple frames focused at once)."
:type 'hook
:group 'doom)
(defun doom-run-switch-buffer-hooks-h (&optional _)
"Trigger `doom-switch-buffer-hook' when selecting a new buffer."
@ -446,34 +471,36 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
org-agenda-mode dired-mode)
"What modes to enable `hl-line-mode' in.")
:config
(if (boundp 'global-hl-line-buffers)
(setq global-hl-line-buffers
`(not (or (lambda (b) (buffer-local-value 'hl-line-mode b))
(lambda (b)
(when global-hl-line-modes
(let ((mode (buffer-local-value 'major-mode b)))
(if (eq (car global-hl-line-modes) 'not)
(provided-mode-derived-p mode global-hl-line-modes)
(not (provided-mode-derived-p mode global-hl-line-modes))))))
(lambda (b) (with-current-buffer b (doom-region-active-p)))
(lambda (b) (buffer-local-value 'cursor-face-highlight-mode b))
(lambda (b) (string-match-p "\\` " (buffer-name b)))
minibufferp))
;; Don't display line highlights in non-focused windows, for
;; performance sake and to reduce UI clutter.
global-hl-line-sticky-flag 'window)
;; HACK: `global-hl-line-buffers' wasn't introduced until 31.1, so I
;; reimplement to `global-hl-line-modes' give us a major mode
;; white/blacklist via `global-hl-line-modes'.
(define-globalized-minor-mode global-hl-line-mode hl-line-mode
(lambda ()
(and (cond (hl-line-mode nil)
((null global-hl-line-modes) nil)
((eq global-hl-line-modes t))
((eq (car global-hl-line-modes) 'not)
(not (derived-mode-p global-hl-line-modes)))
((apply #'derived-mode-p global-hl-line-modes)))
(hl-line-mode +1)))))
(with-no-warnings
(if (boundp 'global-hl-line-buffers)
(setq global-hl-line-buffers
`(not (or (lambda (b) (buffer-local-value 'hl-line-mode b))
(lambda (b)
(when global-hl-line-modes
(let ((mode (buffer-local-value 'major-mode b)))
(if (eq (car global-hl-line-modes) 'not)
(provided-mode-derived-p mode global-hl-line-modes)
(not (provided-mode-derived-p mode global-hl-line-modes))))))
(lambda (b) (with-current-buffer b (doom-region-active-p)))
(lambda (b) (buffer-local-value 'cursor-face-highlight-mode b))
(lambda (b) (string-match-p "\\` " (buffer-name b)))
minibufferp))
;; Don't display line highlights in non-focused windows, for
;; performance sake and to reduce UI clutter.
global-hl-line-sticky-flag 'window)
;; HACK: `global-hl-line-buffers' wasn't introduced until 31.1, so I
;; reimplement it for `global-hl-line-modes', so we have a major mode
;; white/blacklist.
(define-globalized-minor-mode global-hl-line-mode hl-line-mode
(lambda ()
(and (cond (hl-line-mode nil)
((null global-hl-line-modes) nil)
((eq global-hl-line-modes t))
((eq (car global-hl-line-modes) 'not)
(not (derived-mode-p global-hl-line-modes)))
((apply #'derived-mode-p global-hl-line-modes)))
(hl-line-mode +1)))
:group 'hl-line)))
;; Temporarily disable `hl-line-mode' when selection is active, since it
;; doesn't serve much purpose when the selection is so much more visible.
@ -610,7 +637,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(push (list display plist) new-specs)))
(nreverse new-specs)))
(put face 'face-modified nil))
('error
(error
(if (string-prefix-p "Font not available" (error-message-string e))
(signal 'doom-font-error (list (font-get (cdr map) :family)))
(signal (car e) (cdr e))))))

View file

@ -631,7 +631,7 @@ Otherwise, `en/disable-command' (in novice.el.gz) is hardcoded to write them to
(define-advice comp-run-async-workers (:around (fn &rest args) dont-litter-tmpdir)
"Normally, native-comp writes a ton to /tmp. This advice redirects this IO
to `doom-profile-cache-dir' instead, so it doesn't OOM tmpfs users and can be
safely cleaned up with 'doom sync' or 'doom gc'."
safely cleaned up with \\='doom sync' or \\='doom gc'."
(let ((temporary-file-directory (expand-file-name "comp/" doom-profile-cache-dir)))
(make-directory temporary-file-directory t)
(apply fn args)))

View file

@ -125,7 +125,7 @@ If CONSIDER-MODE? is non-nil, returns non-nil if BUF's mode is derived from
;;;###autoload
(defun doom-real-buffer-p (buffer-or-name)
"Returns t if BUFFER-OR-NAME is a 'real' buffer.
"Returns t if BUFFER-OR-NAME is a \\='real' buffer.
A real buffer is a useful buffer; a first class citizen in Doom. Real ones
should get special treatment, because we will be spending most of our time in
@ -157,7 +157,7 @@ If BUFFER-OR-NAME is omitted or nil, the current buffer is tested."
;;;###autoload
(defun doom-unreal-buffer-p (buffer-or-name)
"Return t if BUFFER-OR-NAME is an 'unreal' buffer.
"Return t if BUFFER-OR-NAME is an \\='unreal' buffer.
See `doom-real-buffer-p' for details on what that means."
(not (doom-real-buffer-p buffer-or-name)))

View file

@ -108,7 +108,7 @@ This is much faster and safer than `doom/reload', but not as comprehensive. This
reloads your package and module visibility, but does not install new packages or
remove orphaned ones. It also doesn't reload your private config.
It is useful to only pull in changes performed by 'doom sync' on the command
It is useful to only pull in changes performed by \\='doom sync' on the command
line."
(interactive)
(doom-require 'doom-lib 'profiles)
@ -123,8 +123,8 @@ line."
(defun doom/reload-env ()
"Reloads your envvar file.
DOES NOT REGENERATE IT. You must run 'doom env' in your shell OUTSIDE of Emacs.
Doing so from within Emacs will taint your shell environment.
DOES NOT REGENERATE IT. You must run \\='doom env' in your shell OUTSIDE of
Emacs. Doing so from within Emacs will taint your shell environment.
An envvar file contains a snapshot of your shell environment, which can be
imported into Emacs."

View file

@ -57,10 +57,7 @@
((add-to-list 'doom-debug--unbound-variables (cons spec t)))))
(defun doom-debug--timestamped-message-a (format-string &rest _args)
"Advice to run before `message' that prepends a timestamp to each message.
Activate this advice with:
(advice-add 'message :before 'doom-debug--timestamped-message-a)"
"Advice to run before `message' that prepends a timestamp to each message."
(when (and (stringp format-string)
message-log-max ; if nil, logging is disabled
(not (equal format-string "%s%s"))
@ -83,6 +80,7 @@ Activate this advice with:
(define-minor-mode doom-debug-mode
"Toggle `debug-on-error' and `init-file-debug' for verbose logging."
:global t
:group 'doom
(when (or doom-debug-mode
(and (integerp current-prefix-arg)
(> current-prefix-arg 0)))

View file

@ -467,7 +467,7 @@ This primes `org-mode' for reading."
(org-id-locations-file doom-docs--id-location-file)
(org-id-locations doom-docs--id-locations)
(org-id-files doom-docs--id-files))
(doom/reload-docs)
(doom/reload-docs force?)
(when-let* ((fname (buffer-file-name (buffer-base-buffer))))
(let ((id (org-id-new)))
(org-id-add-location id fname)

View file

@ -3,18 +3,18 @@
;;; Code:
(defun doom-files--build-checks (spec &optional directory)
"Converts a simple nested series of or/and forms into a series of
`file-exists-p' checks.
"Converts simple nested series of/and forms into a series of `file-exists-p'
calls.
For example
(doom-files--build-checks
'(or A (and B C))
\\='(or A (and B C))
\"~\")
Returns (not precisely, but effectively):
'(let* ((_directory \"~\")
\\='(let* ((_directory \"~\")
(A (expand-file-name A _directory))
(B (expand-file-name B _directory))
(C (expand-file-name C _directory)))
@ -100,7 +100,7 @@ MAP is a function or symbol which will be used to transform each entry in the
results.
TYPE determines what kind of path will be included in the results. This can be t
(files and folders), 'files or 'dirs.
(files and folders), \\='files or \\='dirs.
By default, this function returns paths relative to PATH-OR-PATHS if it is a
single path. If it a list of paths, this function returns absolute paths.
@ -256,10 +256,10 @@ called with no arguments and expected to return the contents as any arbitrary
data. By default, BY is set to `buffer-string'. Otherwise, BY recognizes these
special values:
'insert -- insert FILE's contents into the current buffer before point.
'read -- read the first form in FILE and return it as a single S-exp.
'read* -- read all forms in FILE and return it as a list of S-exps.
'(read . N) -- read the first N (an integer) S-exps in FILE.
\\='insert -- insert FILE's contents into the current buffer before point.
\\='read -- read the first form in FILE and return it as a single S-exp.
\\='read* -- read all forms in FILE and return it as a list of S-exps.
\\='(read . N) -- read the first N (an integer) S-exps in FILE.
CODING dictates the encoding of the buffer. This defaults to `utf-8'. If set to
nil, `binary' is used.

View file

@ -25,7 +25,7 @@ If nil, `doom-font' will be used, scaled up by `doom-big-font-increment'. See
"Return FONT as a normalized font spec.
The font will be normalized (i.e. :weight, :slant, and :width will set to
'normal if not specified) before it is converted.
\\='normal if not specified) before it is converted.
FONT can be a `font-spec', a font object, an XFT font string, or an XLFD font
string."
@ -170,6 +170,7 @@ Also resizees `doom-variable-pitch-font' and `doom-serif-font'."
:init-value nil
:lighter " BIG"
:global t
:group 'doom
(if doom-big-font
;; Use `doom-big-font' in lieu of `doom-font'
(doom-adjust-font-size

View file

@ -176,7 +176,7 @@ selection of all minor-modes, active or not."
(defvar ivy-sort-functions-alist)
;;;###autoload
(cl-defun doom-completing-read-org-headings
(prompt files &rest plist &key depth mindepth include-files initial-input extra-candidates action)
(prompt files &rest plist &key _depth _mindepth _include-files initial-input extra-candidates action)
"TODO"
(let ((alist
(append (apply #'doom--org-headings files plist)
@ -401,7 +401,7 @@ without needing to check if they are available."
(defun doom/help-modules (category module &optional visit-dir)
"Open the documentation for a Doom module.
CATEGORY is a keyword and MODULE is a symbol. e.g. :editor and 'evil.
CATEGORY is a keyword and MODULE is a symbol. e.g. :editor and \\='evil.
If VISIT-DIR is non-nil, visit the module's directory rather than its
documentation.

View file

@ -267,7 +267,7 @@ processed."
plist)))
;;;###autoload
(defun doom-package-dependencies (package &optional recursive noerror)
(defun doom-package-dependencies (package &optional recursive _noerror)
"Return a list of dependencies for a package.
If RECURSIVE is `tree', return a tree of dependencies.
@ -319,8 +319,8 @@ non-nil."
;;;###autoload
(defun doom-package-backend (package)
"Return 'straight, 'builtin, 'elpa or 'other, depending on how PACKAGE is
installed."
"Return \\='straight, \\='builtin, \\='elpa or \\='other, depending on how
PACKAGE is installed."
(cond ((gethash (symbol-name package) straight--build-cache)
'straight)
((or (doom-package-built-in-p package)
@ -374,7 +374,6 @@ also be a list of module keys."
(let ((module-list (cond ((null module-list) (doom-module-list))
((symbolp module-list) (doom-module-list 'all))
(module-list)))
(packages-file doom-module-packages-file)
doom-disabled-packages
doom-packages)
(letf! (defun read-packages (key)
@ -493,7 +492,7 @@ also be a list of module keys."
(cdr recipe))))))
(defun doom--package-to-bump-string (package plist)
"Return a PACKAGE and its PLIST in 'username/repo@commit' format."
"Return a PACKAGE and its PLIST in \\='username/repo@commit' format."
(format "%s@%s"
(plist-get (doom--package-merge-recipes package plist) :repo)
(substring-no-properties (plist-get plist :pin) 0 12)))
@ -546,10 +545,10 @@ also be a list of module keys."
;;;###autoload
(defun doom/bump-package-at-point (&optional select)
"Inserts or updates a `:pin' for the `package!' statement at point.
Grabs the latest commit id of the package using 'git'."
Grabs the latest commit id of the package using git."
(interactive "P")
(doom-initialize-packages)
(cl-destructuring-bind (&key package plist beg end)
(cl-destructuring-bind (&key package plist _beg end)
(or (doom--package-at-point)
(user-error "Not on a `package!' call"))
(let* ((recipe (doom--package-merge-recipes package plist))

View file

@ -186,7 +186,7 @@ Returns OUTPUT."
(cl-destructuring-bind (&key if indent level verbose title
;; TODO: Implement these
_benchmark)
(cl-loop for (key val) on body by #'cddr
(cl-loop for (key _val) on body by #'cddr
while (keywordp key)
collect (pop body)
collect (pop body))
@ -268,7 +268,7 @@ based on the print level of the message. For example:
(cadr spec)))))
(defun doom-print--redirect-standard-output (streamspec level &optional old-stream)
(let ((old (or old-stream standard-output))
(let ((_old (or old-stream standard-output))
(streams (doom-print--redirect-streams streamspec level)))
(lambda (ch)
(let ((str (char-to-string ch)))

View file

@ -18,7 +18,7 @@ code of the process and OUTPUT is its stdout output."
"Execute COMMAND with ARGS synchronously.
Unlike `doom-call-process', this pipes output to `standard-output' on the fly to
simulate 'exec' in the shell, so batch scripts could run external programs
simulate \\='exec' in the shell, so batch scripts could run external programs
synchronously without sacrificing their output.
Warning: freezes indefinitely on any stdin prompt."

View file

@ -252,7 +252,7 @@ caches them in `doom--profiles'. If RELOAD? is non-nil, refresh the cache."
;;; Generators
(defun doom-profile-generate (&optional _profile regenerate-only?)
(defun doom-profile-generate (&optional _profile _regenerate-only?)
"Generate profile init files."
(doom-initialize-packages)
(let* ((default-directory doom-profile-dir)

View file

@ -139,21 +139,21 @@ See `display-line-numbers' for what these values mean."
(remove-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h))
;;;###autoload
(defun doom/window-maximize-buffer (&optional arg)
(defun doom/window-maximize-buffer ()
"Close other windows to focus on this one.
Use `winner-undo' to undo this. Alternatively, use `doom/window-enlargen'."
(interactive "P")
(interactive)
(when (and (bound-and-true-p +popup-mode)
(+popup-window-p))
(+popup/raise (selected-window)))
(delete-other-windows))
;;;###autoload
(defun doom/window-enlargen (&optional arg)
(defun doom/window-enlargen ()
"Enlargen the current window (i.e. shrinks others) so you can focus on it.
Use `winner-undo' to undo this. Alternatively, use
`doom/window-maximize-buffer'."
(interactive "P")
(interactive)
(let* ((window (selected-window))
(dedicated-p (window-dedicated-p window))
(preserved-p (window-parameter window 'window-preserved-size))

View file

@ -1,5 +1,9 @@
;;; editor/file-templates/autoload.el -*- lexical-binding: t; -*-
(defvar yas-choose-tables-first)
(defvar yas-choose-keys-first)
(defun +file-templates--set (pred plist)
(if (null (car-safe plist))
(setq +file-templates-alist

View file

@ -1,5 +1,9 @@
;;; lang/emacs-lisp/autoload/emacs-lisp.el -*- lexical-binding: t; -*-
(defvar buttercup-suites)
(defvar pp-max-width)
;;
;;; Library