fix(lib): appease byte-compiler-sama
Silences some byte-compiler warnings about: - 'nreverse on constant list' on add-hook! calls. - inhibit-changing-match-data deprecation warning. - unescaped quotes in docstring in some doom-*-dir variables. - Variable non-essential should be quoted (though it isn't referring to a variable). - CONTEXT -> CONTEXTS to match argument name.
This commit is contained in:
parent
56b6169ae7
commit
8352562b2c
2 changed files with 13 additions and 13 deletions
24
lisp/doom.el
24
lisp/doom.el
|
@ -116,9 +116,9 @@
|
|||
(push 'dynamic-modules features))
|
||||
(if (fboundp #'json-parse-string)
|
||||
(push 'jansson features))
|
||||
(let ((inhibit-changing-match-data t))
|
||||
(if (string-match "HARFBUZZ" system-configuration-features) ; no alternative
|
||||
(push 'harfbuzz features)))
|
||||
(if (string-match-p "HARFBUZZ" system-configuration-features) ; no alternative
|
||||
(push 'harfbuzz features))
|
||||
|
||||
;; The `native-compile' feature exists whether or not it is functional (e.g.
|
||||
;; libgcc is available or not). This seems silly, so pretend it doesn't exist if
|
||||
;; it isn't functional.
|
||||
|
@ -237,7 +237,7 @@ These files should not be shared across systems. By default, it is used by
|
|||
|
||||
Data files contain shared and long-lived data that Doom, Emacs, and their
|
||||
packages require to function correctly or at all. Deleting them by hand will
|
||||
cause breakage, and require user intervention (e.g. a 'doom sync' or 'doom env')
|
||||
cause breakage, and require user intervention (e.g. a `doom sync` or `doom env`)
|
||||
to restore.
|
||||
|
||||
Use this for: server binaries, package source, pulled module libraries,
|
||||
|
@ -254,10 +254,10 @@ For profile-local data files, use `doom-profile-data-dir' instead.")
|
|||
(file-name-concat doom-local-dir "cache/"))
|
||||
"Where Doom stores its global cache files.
|
||||
|
||||
Cache files represent non-essential data that shouldn't be problematic when
|
||||
Cache files represent unessential data that shouldn't be problematic when
|
||||
deleted (besides, perhaps, a one-time performance hit), lack portability (and so
|
||||
shouldn't be copied to other systems/configs), and are regenerated when needed,
|
||||
without user input (e.g. a 'doom sync').
|
||||
without user input (e.g. a `doom sync`).
|
||||
|
||||
Some examples: images/data caches, elisp bytecode, natively compiled elisp,
|
||||
session files, ELPA archives, authinfo files, org-persist, etc.
|
||||
|
@ -273,11 +273,11 @@ For profile-local cache files, use `doom-profile-cache-dir' instead.")
|
|||
(file-name-concat doom-local-dir "state/"))
|
||||
"Where Doom stores its global state files.
|
||||
|
||||
State files contain non-essential, unportable, but persistent data which, if
|
||||
lost won't cause breakage, but may be inconvenient as they cannot be
|
||||
automatically regenerated or restored. For example, a recently-opened file list
|
||||
is not essential, but losing it means losing this record, and restoring it
|
||||
requires revisiting all those files.
|
||||
State files contain unessential, unportable, but persistent data which, if lost
|
||||
won't cause breakage, but may be inconvenient as they cannot be automatically
|
||||
regenerated or restored. For example, a recently-opened file list is not
|
||||
essential, but losing it means losing this record, and restoring it requires
|
||||
revisiting all those files.
|
||||
|
||||
Use this for: history, logs, user-saved data, autosaves/backup files, known
|
||||
projects, recent files, bookmarks.
|
||||
|
@ -529,7 +529,7 @@ wasn't active when this was called."
|
|||
(setq doom-context (delq context doom-context))))
|
||||
|
||||
(defmacro doom-context-with (contexts &rest body)
|
||||
"Evaluate BODY with CONTEXT added to `doom-context'."
|
||||
"Evaluate BODY with CONTEXTS added to `doom-context'."
|
||||
(declare (indent 1))
|
||||
`(let ((doom-context doom-context))
|
||||
(dolist (context (ensure-list ,contexts))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue