nit: comment revision, spellcheck, & reformatting

Close: #7262
Co-authored-by: emergenz <emergenz@users.noreply.github.com>
This commit is contained in:
Henrik Lissner 2023-07-22 18:12:19 +02:00
parent 9a80f783eb
commit 1cd2a287f5
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
5 changed files with 37 additions and 31 deletions

View file

@ -274,20 +274,24 @@ If RETURN-P, return the message as a string instead of displaying it."
;;
;;; Let 'er rip!
;;; Load Doom's defaults and DSL
;;; Load core modules and set up their autoloads
(require 'doom-modules)
(autoload 'doom-initialize-packages "doom-packages")
;; TODO (autoload 'doom-profiles-initialize "doom-profiles")
;; TODO (autoload 'doom-packages-initialize "doom-packages")
;; UX: There's a chance the user will later use package.el or straight in this
;; interactive session. If they do, make sure they're properly initialized
;; when they do.
(autoload 'doom-initialize-packages "doom-packages")
(with-eval-after-load 'package (require 'doom-packages))
(with-eval-after-load 'straight (doom-initialize-packages))
;;
;;; Let 'er rip!
;; A last ditch opportunity to undo dodgy optimizations or do extra
;; configuration before the session is complicated by user config and packages.
(doom-run-hooks 'doom-before-init-hook)

View file

@ -64,9 +64,10 @@
;; offensive) optimizations, and load the minimum for all Doom sessions.
;;
;;; Code:
;; For `when-let' and `if-let' on versions of Emacs before they were autoloaded.
(eval-when-compile (require 'subr-x))
;;; Version checks
(eval-and-compile ; Check version at both compile and runtime.
;; Doom's minimum supported version of Emacs is 27.1. Its my goal to support
;; one major version below the stable release, for about a year or until
@ -160,7 +161,8 @@
(defgroup doom nil
"An Emacs framework for the stubborn martian hacker."
:link '(url-link "https://doomemacs.org"))
:link '(url-link "https://doomemacs.org")
:group 'emacs)
(defconst doom-version "3.0.0-pre"
"Current version of Doom Emacs core.")
@ -677,7 +679,7 @@ but long before your modules and $DOOMDIR/config.el are loaded."
(defcustom doom-after-init-hook ()
"A hook run once Doom's core and modules, and the user's config are loaded.
This triggers at the absolutel atest point in the eager startup process, and
This triggers at the absolute latest point in the eager startup process, and
runs in both interactive and non-interactive sessions, so guard hooks
appropriately against `noninteractive' or the `cli' context."
:group 'doom

View file

@ -82,6 +82,7 @@
(defun doom-system-cpus ()
"Return the max number of processing units on this system.
Tries to be portable. Returns 1 if cannot be determined."
;; REVIEW: Replace with `num-processors' once 27.x support is dropped.
(with-memoization (get 'doom-system-cpus 'cached-value)
(if (fboundp 'num-processors)
(num-processors) ; added in Emacs 28.1

View file

@ -86,12 +86,11 @@ For LSP support the [[doom-module::tools lsp]] module must be enabled, along wit
[[doom-module:+lsp]] flag. By default, it supports [[doom-package:mspyls]] and [[doom-package:pyls]], in that order. With the
[[doom-module:+pyright]] flag, it will try Pyright first.
Each of these servers must be installed on your system via your OS package
manager or manually:
- [[https://pypi.org/project/python-language-server/][*pyls*]] can be installed with ~$ pip install python-language-server[all]~.
- *mspyls* can be installed by typing ~M-x lsp-install-server RET mspyls~.
- *pyright* can be installed with ~$ pip install pyright~ or ~$ npm i -g
pyright~.
An alternative LSP server can be used by installing them through the
[[cmd:][lsp-install-server]] command, or an external package manager. For example:
- To install [[https://pypi.org/project/python-language-server/][*pyls*]]: ~$ pip install python-language-server[all]~.
- To install *mspyls*: ~M-x lsp-install-server RET mspyls~.
- To install *pyright*: ~$ pip install pyright~ or ~$ npm i -g pyright~.
* TODO Usage
#+begin_quote
@ -107,7 +106,7 @@ To enable support for auto-formatting with black enable [[doom-module::editor fo
| Binding | Description |
|-------------------+----------------------------------|
| [[kbd:][<localleader> c c]] | ~Compile Cython buffer~ |
| [[kbd:][<localleader> i i]] | ~Insert mising imports~ |
| [[kbd:][<localleader> i i]] | ~Insert missing imports~ |
| [[kbd:][<localleader> i r]] | ~Remove unused imports~ |
| [[kbd:][<localleader> i s]] | ~Sort imports~ |
| [[kbd:][<localleader> i o]] | ~Optimize imports~ |
@ -135,8 +134,8 @@ To enable support for auto-formatting with black enable [[doom-module::editor fo
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote
This module has the following variables to set extra arguments to [[https://ipython.org/][ipython]] and
[[https://jupyter.org/][jupyter]] shells:
The arguments passed to the [[https://ipython.org/][ipython]] or [[https://jupyter.org/][jupyter]] shells can be altered through
these two variables:
#+begin_src emacs-lisp
;; in $DOOMDIR/config.el
(setq +python-ipython-repl-args '("-i" "--simple-prompt" "--no-color-info"))

View file

@ -36,7 +36,7 @@ as =$DOOMDIR=).
3. To launch a profile:
- Launch the profile you want: ~$ emacs --profile FOO~
- Use ~bin/doom~ on the profile you want: ~$ doom sync --profile FOO~
* Auto-generated profiles
Doom v3's sandbox and transactional package manager are capable of generating
profiles on-the-fly. The former for rapid, isolated testing, and the latter for
@ -46,15 +46,15 @@ These auto-generated profiles will be stored and versioned in:
=$XDG_DATA_HOME/doom/$PROFILE_NAME/@/$PROFILE_VERSION/=
* Fallback profile
Unlike Chemacs, Doom's profiles has no notion of a "default"/fallback profile.
The fallback profile is the Doom installation doing the bootloading. This
"global" profile is unique in that it won't respect a =.doomprofile= -- in other
words, it's not treated as a normal profile.
Unlike Chemacs, Doom's profiles has no notion of a "default"/fallback profile --
rather, the fallback profile is the Doom installation doing the bootloading.
This "global" profile is unique in that it won't respect a =.doomprofile= -- in
other words, it's not treated as a normal profile.
It is this way so that the profiles system imposes no overhead on users that
It is this way so that the profiles system imposes no overhead on users that
aren't interested in the profile system (or prefer to use Chemacs).
However, you can emulate this behavior by registering the "global" profile as a
However, this behavior can be emulated by registering the "global" profile as a
profile, and setting ~$DOOMPROFILE~ or aliasing ~emacs~, like so:
#+begin_src emacs-lisp
@ -117,19 +117,19 @@ There are two caveats with this profile system:
3. Move =~/.emacs-profiles.el= to =~/.config/doom/profiles.el= and transform the
string keys to symbols and adapt =env= entries like so:
#+begin_src emacs-lisp
;; ~/.emacs-profiles.el
(("default" (user-emacs-directory . "~/.emacs.default")
(env ("DOOMDIR" . "~/.doom.private")))
("spacemacs" (user-emacs-directory . "~/spacemacs"))
("prelude" (user-emacs-directory . "~/prelude")))
(("default" (user-emacs-directory . "~/.emacs.default/")
(env ("DOOMDIR" . "~/.doom.private/")))
("spacemacs" (user-emacs-directory . "~/spacemacs/"))
("prelude" (user-emacs-directory . "~/prelude/")))
;; ~/.config/emacs/profiles.el
((default (user-emacs-directory . "~/.emacs.default")
("DOOMDIR" . "~/.doom.private"))
(spacemacs (user-emacs-directory . "~/spacemacs"))
(prelude (user-emacs-directory . "~/prelude")))
((default (user-emacs-directory . "~/.emacs.default/")
("DOOMDIR" . "~/.doom.private/"))
(spacemacs (user-emacs-directory . "~/spacemacs/"))
(prelude (user-emacs-directory . "~/prelude/")))
#+end_src
A comprehensive example of Doom's profiles.el file can be found