Commit Graph

123 Commits

Author SHA1 Message Date
Henrik Lissner
cadc778a03
perf(lib): optimize doom-path
Consecutive expand-file-name and recursive apply's can be expensive, so
the function has been simplified to rely more on file-name-concat. This
does change one trait about it, however: absolute paths in SEGMENTS no
long reroot the whole path, and are concatenated as ordinary file
segments.

The performance benefit is more pronounced on Emacs 28+, and will be
even more so when Doom later starts byte-compiling its libraries.
2022-09-06 22:55:48 +02:00
Henrik Lissner
b68c93d924
refactor: move doom-*-reload-hook to lib/config.el
These hooks are only used by this library, and in interactive sessions,
neither of which make them a good fit for doom.el.
2022-09-06 22:55:47 +02:00
Henrik Lissner
98b8f01de3
fix(lib): vestigial call to missing cat function
This was brought over from `doom-info` in f33d8e7, but one of the
lexical function calls wasn't refactored out.

Ref: a5c80fcb4b/lisp/lib/debug.el (L216-L219)
Fix: #6698
Amend: c5e3f4d632
Co-authored-by: ivanbrennan <ivanbrennan@users.noreply.github.com>
2022-09-06 22:55:45 +02:00
Ivan
b36931dd45
fix(lib): doom-exec-process use doom-print--format
The doom--format function was removed in fe16de6.

Amend: fe16de690418
2022-08-19 11:21:22 +02:00
Henrik Lissner
4c9df9bfc6
fix: partially revert OS detection changes
These changes snuck into ad6a3d0, but have not been implemented yet, so
some OS-specific functionality was orphaned.

Amend: ad6a3d0f33
2022-08-18 17:08:16 +02:00
Henrik Lissner
401a5aa530
refactor(docs): move doom-docs-dir to lib/docs.el
This is not an essential core variable, so it should be defined where it
used, instead.
2022-08-14 20:43:36 +02:00
Henrik Lissner
aa54383b5d
refactor: deprecate doom-etc-dir for doom-data-dir
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
2022-08-14 20:43:35 +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
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
c540f1b515
perf(lib): memoize doom-system-* functions 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
0f43c3eed5
fix(docs): org-glossary init
- Set org-glossary-global-terms buffer-locally,
- Move org-glossary init into a hook.
- Remove unneeded (require 'ox) (see tecosaur/org-glossary#6),

Ref: tecosaur/org-glossary#6
2022-08-07 19:43:28 +02:00
Henrik Lissner
8ec9e7ea0d
nit(docs): reformat and annotate
- Rename doom-docs--display-header-h -> doom-docs--display-menu-h to
  better represent what it does.
- Add comments to describe the purpose of lib/docs, and TODO annotations
  to hint at its future and remind me later.
2022-08-07 19:43:28 +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
d92a81bf2d
feat(lib): add lib/git
Where future git wrappers will live.
2022-08-07 19:43:28 +02:00
Henrik Lissner
057e6c531c
refactor: replace doom-enlist with ensure-list
doom-enlist is now a deprecated alias for ensure-list, which is built
into Emacs 28.1+ and is its drop-in replacement. We've already
backported it for 27.x users in doom-lib (in 4bf4978).

Ref: 4bf49785fd
2022-08-07 19:43:13 +02:00
Henrik Lissner
725de1ca35
perf(docs): disable gc for doom-docs-org-mode 2022-08-05 21:44:09 +02:00
Henrik Lissner
d6ffd2bfaa
fix(file-templates): update doom doc templates
To reflect the new mode: line added in 7e400ab, and add an ID property.
Also corrects heading level in __doom-readme file template.

Ref: 7e400abdc0
2022-08-04 01:15:23 +02:00
Henrik Lissner
c1512feea1
fix(docs): disable doom-docs--hide-stars-h
Hiding the stars with org-fold breaks org-cycle, so until I have time to
fix it, I'll disable this hook altogether.
2022-08-03 04:20:52 +02:00
Henrik Lissner
1f8bf7accb
merge: rewrite-docs
I've omitted docs/*.org from this merge, as there is still work left to
do there, but I am pushing the module docs early so folks can benefit
from the new docs sooner.
2022-08-03 03:27:50 +02:00
Henrik Lissner
2bb052ac17
tweak(lib): fix doomemacs URLs in help commands 2022-08-02 20:15:29 +02:00
Henrik Lissner
55736ac2a6
fix(lib): prevent autoload failure at startup
In some edge cases, an early call to doom-log will cause an autoload
error because of one or more of the following is true:

- The autoloads file hasn't been generated or loaded,
- The autoloads file is out of date (especially relevant after
  b9933e6),
- doom-cli hasn't loaded lib/files eagerly yet.

To avoid this, and due to how prolific doom-log's uses are, and how
trivial the dependency is, I simply remove the dependency.

Amend: b9933e6637
2022-07-31 13:31:21 +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