Commit graph

16 commits

Author SHA1 Message Date
Henrik Lissner
39197618ec
fix(lib): only set doom-print-minimum-level in debug-mode 2022-09-16 03:17:46 +02:00
Henrik Lissner
b183a0835d
feat(lib): add active profile to doom-info 2022-09-16 01:14:23 +02:00
Henrik Lissner
0c918f3b2d
refactor: change doom-module-list signature
Used to return the hash-table `doom-modules` (if not all-p), but I've
changed it to return a list of cons cells (:CATEGORY . MODULE),
representing all enabled modules, in the order they were enabled.

The purpose of this change is to prepare for a change in the structure
of doom-modules, and how Doom stores its module metadata.
2022-09-16 01:14:21 +02:00
Henrik Lissner
6cac7b05b6
refactor(lib): tidy doom-log output
This commit reduces the debug log noise, makes it easier to
read/parse/search, and soft-introduces a convention for doom-log
messages, where they are prefixed with a unique identifier loosely named
after it's running context or calling function.

I haven't enforced it everywhere doom-log is used yet, but this is a
start.
2022-09-12 16:01:43 +02:00
Henrik Lissner
ce0e3a04b6
tweak(lib): prevent redundant timestamps in logs 2022-09-10 18:36:24 +02:00
Henrik Lissner
78af0eeecb
fix(lib): only set top-level values of debug variables 2022-09-10 18:36:24 +02:00
Henrik Lissner
05d06cc552
tweak(lib): suppress GC logging in debug mode
It happens so often it can overwhelm the echo area. It's still logged
to *Messages* however.
2022-09-10 18:36:24 +02:00
Henrik Lissner
d290152a8e
refactor(lib): replace doom-debugger with advice
Writing a debugger for Elisp is too much hassle. `debug` itself isn't
very customizable without a *lot* of boilerplate, so instead of writing
my own, it's more effective to advise debug instead. Certainly, I don't
do anything with it yet, but I will soon.
2022-09-10 18:36:24 +02:00
Henrik Lissner
b121c5e1c6
refactor(lib): provide doom-libs as subfeatures
This allows us to load them via doom-require. Why not use normal
features? Because Doom's libraries are designed to be loaded as part of
Doom, and will openly rely on Doom state if needed; this is a contract I
want to enforce by ensuring their only entry points are through
`doom-require` or autoloading.

I will add them to the rest of the libraries later.

Site-node: this also adds Commentary+Code to the comment headings, as I
want a space to use that space to describe the library, when I get
around to it.
2022-09-08 00:20:26 +02:00
ivanbrennan
1d942b4ab6 fix(lib): doom/version use canonical filenames
If doom-emacs-dir contains a "~", attempting to call `git -C` will fail
with an error like:

  fatal: cannot change to '~/.config/emacs/': No such file or directory

Fix this by canonicalizing the filename.
2022-09-07 00:20:24 +02:00
Henrik Lissner
48369fb654
fix(lib): add native-comp vars to known debug vars
And reformat the list to distinguish Doom vars from Emacs ones.

Amend: 3853dff5e1
2022-09-06 23:34:56 +02:00
Henrik Lissner
948f9461a7
refactor(cli): merge doom-cli-lib into doom-cli
This was done to purge superfluous files from Doom's project structure
and simplify its entry points. And with early-init.el now acting as
Doom's universal bootstrapper (see c05e615), we don't have enough
bootstrap logic to warrant being its own file.

Also removes the redundant version check, given doom.el is assured to be
loaded before doom-cli, and performs its own check.

Ref: c05e61536e
2022-09-06 23:01:39 +02:00
Henrik Lissner
a5c80fcb4b
refactor: deprecate doom-private-dir for doom-user-dir
- Deprecates the doom-private-dir variable in favor of doom-user-dir.
- Renames the pseudo category for the user's module: :private -> :user.
- Renames the doom-private-error error type to doom-user-error.

Emacs uses the term "user" to refer to the "things" in user space (e.g.
user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs,
package-user-dir, etc), and I'd like to be consistent with that. It also
has the nice side-effect of being slightly shorter. I also hope
'doom-user-error' will be less obtuse to beginners than
'doom-private-error'.
2022-08-14 20:43:35 +02:00
Henrik Lissner
9c80b33b89
tweak: suppress defvaralias warnings 2022-08-08 18:23:47 +02:00
Henrik Lissner
034ade0468
fix(lib): doom-debug-mode forgetting initial values
Of the variables that it changes (see doom-debug-variables).
2022-08-07 19:43:28 +02:00
Henrik Lissner
b9933e6637
refactor!: restructure Doom core
BREAKING CHANGE: This restructures the project in preparation for Doom
to be split into two repos. Users that have reconfigured Doom's CLI
stand a good chance of seeing breakage, especially if they've referred
to any core-* feature, e.g.

  (after! core-cli-ci ...)

To fix it, simply s/core-/doom-/, i.e.

  (after! doom-cli-ci ...)

What this commit specifically changes is:
- Renames all core features from core-* to doom-*
- Moves core/core-* -> lisp/doom-*
- Moves core/autoloads/* -> lisp/lib/*
- Moves core/templates -> templates/

Ref: #4273
2022-07-30 22:41:13 +02:00
Renamed from core/autoload/debug.el (Browse further)