Commit graph

321 commits

Author SHA1 Message Date
Henrik Lissner
3bea4f66a8
refactor(emacs-lisp): elisp-demos: reorganize Doom demos
- Move Doom core elisp API demos out of docs/examples.org into lisp/demos.org.
- Recognize and search demos.org file in modules for additional
  demos (including $DOOMDIR/demos.org).
- Refactor emacs-lisp module to use new elisp-demos-user-files variable
  instead of an advice. This way, elisp-demo's commands (such as
  `elisp-demos-find-demo` and `elisp-demos-add-demo`) will include
  Doom's demos.
2024-02-04 17:54:29 -05:00
Henrik Lissner
d38787edf4
bump: :lang emacs-lisp
Wilfred/elisp-def@1d2e88a232 -> Wilfred/elisp-def@1ad4baccbf
jorgenschaefer/emacs-buttercup@30c703d215 -> jorgenschaefer/emacs-buttercup@24d43b2ce2
purcell/flycheck-package@3a6aaed29f -> purcell/flycheck-package@75efa098cf
tonini/overseer.el@02d49f582e -> tonini/overseer.el@7fdcf1a6fb
xuchunyang/elisp-demos@8d0cd806b1 -> xuchunyang/elisp-demos@1a108d1c50
2024-02-02 18:50:31 -05:00
Henrik Lissner
ffd2654aa3
fix(emacs-lisp): non-package-mode: only enable in elisp buffers
This prevents +emacs-lisp-non-package-mode from being activated in
non-elisp buffers.

Amend: #7341
Close: #7645
Co-authored-by: PatrickNorton <PatrickNorton@users.noreply.github.com>
2024-02-02 18:50:31 -05:00
Henrik Lissner
0290663cf3
fix(emacs-lisp): void-variable flycheck-disabled-checkers error
Fix: #7644
Amend: b50b2c4640
Amend: #7341
2024-02-02 03:18:52 -05:00
Henrik Lissner
ddca307b39
merge: pull request #7341 from jeetelongname/flymake-less-error
feat(emacs-lisp): add reduced-flymake-byte-compile
2024-02-01 18:45:42 -05:00
Liam Hupfer
6666685993 fix(emacs-lisp): add elisp flymake load path advice
We set flycheck-emacs-lisp-load-path to 'inherit, which evaluates
load-path when spawning the Emacs subprocess. flymake relies on a static
variable, hence the advice. elisp-flymake-byte-compile is autoloaded by
elisp-mode, so there is little reason to condition on `:checkers syntax
+flymake`.

Ref: e56e30d8c6/flycheck.el (L8725-L8727)
Ref: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/elisp-mode.el?h=emacs-29.1#n2166
Ref: https://emacs.stackexchange.com/questions/48661/how-do-i-get-flymake-to-recognize-files-in-my-load-path
2024-02-01 18:44:35 -05:00
Jeetaditya Chatterjee
a7b810a93f
fix(emacs-lisp): lexical argument, error popup
this was caused by the use of fn! and an argument which interacted badly
with doom snippets of all things.
2023-10-15 19:33:07 +01:00
Henrik Lissner
88bb045388
docs(*): replace all-the-icons with nerd-icons
Also colorizes the leading icon in notices.
2023-09-16 20:19:11 +02:00
Jeetaditya Chatterjee
b50b2c4640
refactor(syntax): separate out implementations
As `+emacs-lisp-non-package-mode` handles both flymake and flycheck,
making two internal modes that then `+emacs-lisp-non-package-mode`
calls, makes the code cleaner
2023-09-15 12:13:49 +01:00
Jeetaditya Chatterjee
c37f314f14
fix(syntax): s/connetion/connection
Also rework docstring and s/too/to
2023-09-15 12:13:49 +01:00
Jeetaditya Chatterjee
e976351424
feat(emacs-lisp): add reduced-flymake-byte-compile
This is a flymake backend that gives a reduced set of byte compiler
warnings in accordance too `+emacs-lisp-linter-warnings`
2023-09-15 12:13:49 +01:00
Jeetaditya Chatterjee
2e67ad18e9
feat(emacs-lisp): no doc warnings with flymake 2023-09-15 12:13:48 +01:00
Ian Kerins
5efec260ef fix(format): use correct lisp format function
`apheleia--indent-lisp-buffer` does not exist.

Ref: #6369
2023-09-14 03:31:56 +02:00
Henrik Lissner
a234d8e9c0
merge: pull request #6369 from elken/feature/editor-format-refactor 2023-09-14 01:19:01 +02:00
Ellis Kenyő
0a79b40443
docs(emacs-lisp): add formatter docs 2023-09-13 20:21:02 +01:00
Ellis Kenyő
cd79edf134
feat(format): add :lang emacs-lisp formatter
Introduce a formatter function for emacs-lisp (tracked upstream here
[1]) that tries to preserve as much of what the user wants as possible

[1]: https://github.com/radian-software/apheleia/pull/102
2023-09-13 20:20:58 +01:00
Henrik Lissner
8e671f494d
fix(emacs-lisp): failure to look up module docs
Incorrect regex would cause (search-failed "\* ...$") errors, and would
fail to unfold the target entries if it was hidden.
2023-09-12 21:30:56 +02:00
Henrik Lissner
f427c8a30e
tweak: scroll-conservatively = 10
Forces the window to recenter if the cursor moves >=10 lines off-screen.
This makes some of our manual recentering elsewhere unnecessary.
2023-09-11 23:53:36 +02:00
Henrik Lissner
d8e16db605
fix(emacs-lisp): Doom API demos in help(ful) docs
Due to cd26975, `with-file-contents!` leaves the cursor at point-min,
not point-max, so this `re-search-backward` call would never find its
mark. Now, the elisp demos for Doom functions/macros should show up
again in helpful-*/describe-* buffers.

Amend: cd269753cf
2023-09-10 05:13:37 +02:00
Henrik Lissner
45e34fb723
bump: :lang beancount emacs-lisp sh
beancount/beancount-mode@519bfd868f -> beancount/beancount-mode@0f1e33067e
emacsorphanage/macrostep@75ecd04121 -> emacsorphanage/macrostep@0b04a89f69
jorgenschaefer/emacs-buttercup@07a52c9969 -> jorgenschaefer/emacs-buttercup@30c703d215
wwwjfy/emacs-fish@d04478c0ab -> wwwjfy/emacs-fish@6869efbc05
xuchunyang/elisp-demos@792be709c8 -> xuchunyang/elisp-demos@8d0cd806b1
2023-08-18 18:47:13 +02:00
Jeetaditya Chatterjee
4696f0d4ce
tweak(syntax): feat gate flycheck in all modules 2023-07-25 00:11:09 +01:00
Henrik Lissner
ba8bf1ab9f
bump: :lang
Alexander-Miller/company-shell@a77f4de759 -> Alexander-Miller/company-shell@5f959a63a6
Emacs-Kotlin-Mode-Maintainers/kotlin-mode@3e0c34087b -> Emacs-Kotlin-Mode-Maintainers/kotlin-mode@fddd747e5b
FStarLang/fstar-mode.el@c95c2a61a6 -> FStarLang/fstar-mode.el@ab0697b947
Fuco1/sphinx-mode@9d4075c106 -> Fuco1/sphinx-mode@77ca51adf9
Groovy-Emacs-Modes/groovy-emacs-modes@bf732d367b -> Groovy-Emacs-Modes/groovy-emacs-modes@c612ac1e9f
Khady/merlin-eldoc@db7fab1edd -> Khady/merlin-eldoc@bf8edc63d8
OVYA/php-cs-fixer@7e12a1af5d -> OVYA/php-cs-fixer@efe4368d89
ProofGeneral/PG@e1e29acb04 -> ProofGeneral/PG@8416875696
Wilfred/elisp-def@dfca043ec0 -> Wilfred/elisp-def@1d2e88a232
agda/agda@b612cabaae -> agda/agda@bb7603d197
amake/flutter.el@08138f8c95 -> amake/flutter.el@edd3f5eb3f
ananthakumaran/exunit.el@0715c2dc2d -> ananthakumaran/exunit.el@e0a8c2b81f
beancount/beancount-mode@ea8257881b -> beancount/beancount-mode@519bfd868f
bradyt/dart-mode@3bac14200f -> bradyt/dart-mode@9c846769ab
brantou/emacs-go-tag@59b243f2fa -> brantou/emacs-go-tag@33f2059551
cdominik/cdlatex@8e963c6853 -> cdominik/cdlatex@ac024ce293
clojure-emacs/cider@92c1b6de20 -> clojure-emacs/cider@1ed5163433
clojure-emacs/clj-refactor.el@db89b55871 -> clojure-emacs/clj-refactor.el@b5abe655e5
clojure-emacs/clojure-mode@414157c3e5 -> clojure-emacs/clojure-mode@3453cd229b
cpitclaudel/company-coq@a6e349e013 -> cpitclaudel/company-coq@5affe7a96a
crystal-lang-tools/emacs-crystal-mode@96a8058205 -> crystal-lang-tools/emacs-crystal-mode@9bfb9f0f56
davazp/graphql-mode@9740e4027b -> davazp/graphql-mode@1437b79006
diml/utop@bbd9a6ed45 -> diml/utop@ace481388a
dominikh/go-mode.el@3273fcece5 -> dominikh/go-mode.el@166dfb1e09
elixir-editors/emacs-elixir@e0d0466d83 -> elixir-editors/emacs-elixir@7641373f05
emacs-csharp/csharp-mode@856ecbc0a7 -> emacs-csharp/csharp-mode@02c61c219b
emacs-ess/ESS@39eba28300 -> emacs-ess/ESS@8b4664e4a7
emacs-lsp/lsp-dart@fda433671f -> emacs-lsp/lsp-dart@3db9f93c83
emacs-lsp/lsp-java@0968038b9a -> emacs-lsp/lsp-java@dbe448a886
emacs-lsp/lsp-sourcekit@f877659bab -> emacs-lsp/lsp-sourcekit@468c641e35
emacs-php/composer.el@7c7f89df22 -> emacs-php/composer.el@5af1707fef
emacs-php/php-mode@5f26bec865 -> emacs-php/php-mode@fb11df8268
emacs-php/phpactor.el@34195f1533 -> emacs-php/phpactor.el@9440005814
emacs-php/psysh.el@21250984ad -> emacs-php/psysh.el@796b26a5cd
emacs-straight/auctex@830e40a063 -> emacs-straight/auctex@3929d5408b
emacs-straight/csv-mode@43f6106f0d -> emacs-straight/csv-mode@d190a479b4
emacs-straight/rainbow-mode@949166cc01 -> emacs-straight/rainbow-mode@8e96388fb4
emacs-straight/sml-mode@0338e9729b -> emacs-straight/sml-mode@5426ff4738
emacsmirror/auctex-latexmk@4d35352265 -> emacsmirror/auctex-latexmk@b00a95e6b3
emacsmirror/paredit@e4a67f4f23 -> emacsmirror/paredit@9a2c4b37fc
emacsorphanage/macrostep@424e3734a1 -> emacsorphanage/macrostep@75ecd04121
erlang/otp@9ba9f6e60d -> erlang/otp@be7109f43b
ethereum/emacs-solidity@20fb77e089 -> ethereum/emacs-solidity@ddb4a901c3
factor/factor@1aeafdb87b -> factor/factor@76ac65649d
fsharp/emacs-fsharp-mode@c1e58c61f9 -> fsharp/emacs-fsharp-mode@09fec6c91f
fxbois/web-mode@efa853e5cf -> fxbois/web-mode@df97ab62c9
godotengine/emacs-gdscript-mode@4badcf6a0c -> godotengine/emacs-gdscript-mode@d392e8aa7e
greghendershott/racket-mode@af9b760e7b -> greghendershott/racket-mode@947d9806ee
hhvm/hack-mode@a522f61c08 -> hhvm/hack-mode@26f06ffe82
idris-hackers/idris-mode@65d6db1b75 -> idris-hackers/idris-mode@c96f45d1b8
immerrr/lua-mode@5a9bee8d5f -> immerrr/lua-mode@ad639c62e3
iyefrat/evil-tex@0fa85c3fc8 -> iyefrat/evil-tex@3e0a26b91a
jcollard/elm-mode@d4e434fa18 -> jcollard/elm-mode@5797500d74
joaotavora/sly@4513c382f0 -> joaotavora/sly@fa70fc8ab1
jorgenschaefer/emacs-buttercup@ceedad5efa -> jorgenschaefer/emacs-buttercup@07a52c9969
jrblevin/markdown-mode@1f709778ac -> jrblevin/markdown-mode@c765b73b37
jschaf/powershell.el@ce1f0ae0b2 -> jschaf/powershell.el@f2da15857e
jwiegley/emacs-async@c78bab7506 -> jwiegley/emacs-async@71cc50f27f
leanprover/lean-mode@c1c68cc946 -> leanprover/lean-mode@362bc6fa3e
ledger/ledger-mode@b55384d9cd -> ledger/ledger-mode@4b32f70173
midnightSuyama/shader-mode@d7dc8d0d6f -> midnightSuyama/shader-mode@fe5a1982ba
necaris/conda.el@667968184e -> necaris/conda.el@28f51e49fd
nlamirault/phpunit.el@fe6bc91c3b -> nlamirault/phpunit.el@4a36906344
ocaml-ppx/ocamlformat@9cbd8150c2 -> ocaml-ppx/ocamlformat@1ad4bdba9e
ocaml/dune@3df932f7f9 -> ocaml/dune@f5a5a9c17b
ocaml/merlin@be753d9412 -> ocaml/merlin@306af713e2
ocaml/tuareg@ad8a688b7e -> ocaml/tuareg@53ce2fdfdd
pashky/restclient.el@9e2cfa8652 -> pashky/restclient.el@0ba72816f9
polymode/polymode@2094c92403 -> polymode/polymode@15b6c1e94a
purcell/flycheck-package@615c1ed8c6 -> purcell/flycheck-package@3a6aaed29f
purescript-emacs/purescript-mode@0acd1af446 -> purescript-emacs/purescript-mode@cf113871f9
s-kostyaev/go-gen-test@35df36dcd5 -> s-kostyaev/go-gen-test@f84f4177af
seagle0128/grip-mode@6d6ddbe0af -> seagle0128/grip-mode@5809fb62f6
sebasmonia/sharper@96edd4a1db -> sebasmonia/sharper@496e90e337
smihica/emmet-mode@6b2e554f7f -> smihica/emmet-mode@63b6932603
swift-emacs/swift-mode@f4529efa45 -> swift-emacs/swift-mode@1244ee48de
technomancy/fennel-mode@5664357349 -> technomancy/fennel-mode@52da9715b0
vspinu/company-math@45778f5731 -> vspinu/company-math@3eb006874e
whirm/flycheck-kotlin@bf1b398bdd -> whirm/flycheck-kotlin@a2a6abb9a7
wwwjfy/emacs-fish@a7c953b149 -> wwwjfy/emacs-fish@d04478c0ab
xuchunyang/elisp-demos@01c301b516 -> xuchunyang/elisp-demos@792be709c8
yoshiki/yaml-mode@535273d5a1 -> yoshiki/yaml-mode@3fcb36d603
ziglang/zig-mode@aa20d630b8 -> ziglang/zig-mode@9c5e41d6a0
2023-02-21 19:32:39 -05:00
Itai Y. Efrat
a1903ac4d5 fix(emacs-lisp): docstring url format which error popup
In emacs 29 wrong quotes in docstrings throw up compilation errors,
which pop up randomly with no real context when using doom. I have found
a reference to url's being single quoted in the emacs wiki[0], but the
emacs manual shows the standard format[1], not sure if it changed or was
a mistake. Also it should have a URL prefix apparently.

[0]: https://www.emacswiki.org/emacs/DocString
[1]: info elisp 'Documentation tips'
2023-02-18 00:58:58 -05:00
Henrik Lissner
d39ec50bb7
fix(emacs-lisp): backport mode-name from 28+
In Emacs 28+, the mode-name in emacs-lisp-mode is "ELisp/X" (where X = d
or l depending on lexical-binding). I find this much more useful than
"Emacs-Lisp" in <=27.x or our static replacement "Elisp".
2022-10-29 01:57:43 +02:00
Henrik Lissner
a0ccb6b95b
feat(emacs-lisp,lispy): recognize ;;* outline headings
Permit `;;* ...` be recognized by imenu and outline-minor-mode (and
outline's commands). This also patches Lispy to reflect this new
configuration (if :lang emacs-lisp is active).

Close: #6732
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2022-10-29 01:57:43 +02:00
TEC
5ac2a5258b docs: change link format 2022-10-05 01:01:19 +02:00
Henrik Lissner
156fade7e2
fix(emacs-lisp): set doom-module-context in eval handler
So module context is in scope of evaluated code.

Amend: 4efaf6837b
2022-09-25 17:52:07 +02:00
Henrik Lissner
f9201eb218
refactor: introduce doom-context
Introduces a system to announce what execution contexts are active, so I
can react appropriately, emit more helpful logs/warnings in the case of
issues, and throw more meaningful errors.

* bin/doom: load module CLIs in the 'modules' context.
* lisp/cli/doctor.el: load package files in 'packages' context.
* lisp/doom-cli.el:
  - (doom-before-init-hook, doom-after-init-hook): trigger hooks at the
    correct time. This may increase startup load time, as the benchmark
    now times more of the startup process.
  - (doom-cli-execute, doom-cli-context-execute,
    doom-cli-context-restore, doom-cli-context-parse,
    doom-cli--output-benchmark-h, doom-cli-call, doom-cli--restart,
    doom-cli-load, run!): remove redundant context prefix in debug logs,
    it's now redundant with doom-context, which doom-log now prefixes
    them with.
* lisp/doom-lib.el (doom-log): prefix doom-context to doom-log output,
  unless it starts with :.
* lisp/doom-packages.el (package!, doom-packages--read): throw error if
  not used in a packages.el file or in the context of our package
  manager.
* lisp/doom-profiles.el (doom-profile--generate-init-vars,
  doom-profile--generate-load-modules): use modules doom-context instead
  of doom-init-time to detect startup.
* lisp/doom-start.el (doom-load-packages-incrementally-h): move function
  closer to end of doom-after-init-hook.
* lisp/doom.el:
  - (doom-before-init-hook, doom--set-initial-values-h,
    doom--begin-init-h): rename doom--set-initial-values-h to
    doom--begin-init-h and ensure it runs as late in
    doom-before-init-hook as possible, as that is the point where Doom's
    "initialization" formally begins.
  - (doom-after-init-hook): don't trigger at the end of command-line-1
    in non-interactive sessions. This will be triggered manually in
    doom-cli.el's run!.
* lisp/lib/config.el (doom/reload, doom/reload-autoloads,
  doom/reload-env): use 'reload' context for reload commands.
* modules/lang/emacs-lisp/autoload.el (+emacs-lisp-eval): use 'eval'
  context.
* modules/lang/org/config.el: remove doom-reloading-p; check for
  'reload' doom context instead.
2022-09-24 22:09:05 +02:00
Henrik Lissner
1c4217aa27
refactor: minor refactors & commentary revision
* lisp/doom-cli.el:
  - reference backport source commit.
  - doom-cli--restart: a type check is all we need here. This is a
    programmer error, not a user error.
* lisp/doom-editor.el (recentf): mention recentf-show-abbreviated (added in
  emacs-mirror/emacs@32906819ad)
* lisp/doom-keybinds.el (doom-init-leader-keys-h): move to
  doom-after-init-hook, in case the user customizes leader variables in
  a previous hook (like emacs-startup-hook or after-init-hook).
* lisp/doom-start.el: use eval-when! to compile out the section on
  non-macOS systems (when Doom gets around to compiling its core files,
  later).
* modules/config/literate/autoload.el (+literate-config-file): use
  file-name-concat instead of string concat. This relaxes the
  requirement that doom-user-dir end in a /; a requirement I intend to
  fully phase out.
* modules/lang/emacs-lisp/autoload.el (+emacs-lisp-non-package): remove
  empty map! macro in flycheck-emacs-lisp-check-form. The macro already
  no-ops at compile-time/in noninteractive sessions since b480ed51a3.
* modules/ui/hl-todo/config.el (hl-todo-keyword-faces): revise
  commentary for default hl-todo keywords.

Ref: emacs-mirror/emacs@32906819ad
Ref: b480ed51a3
2022-09-24 20:31:34 +02:00
Henrik Lissner
732d87ac3e
nit: minor comment revision and refactors 2022-09-16 17:01:57 +02:00
Henrik Lissner
c5e88d229f
fix(lib): doom-compile-function throwing native-compiler-error 2022-09-16 16:15:07 +02:00
Henrik Lissner
e1ef4cc001
fix(emacs-lisp): datatype error in fileless elisp buffers
Due to +emacs-lisp-non-package-mode assuming it would always execute in
a file-visiting buffer.

Fix: #6786
2022-09-16 13:07:28 +02:00
Henrik Lissner
36d3a62f6e
fix(emacs-lisp): defconst->defvar for +emacs-lisp-linter-warnings
This wasn't supposed to be a constant, and there's no reason it should
be one.

Amend: afa154db27
2022-09-16 02:06:43 +02:00
Henrik Lissner
20ab9154c2
refactor(emacs-lisp): sharp-quote function symbols 2022-09-16 01:14:24 +02:00
Henrik Lissner
94ea4aa7dc
docs: add examples.org
This adds the basic framework of docs/examples.org, including the former
contents of demo.org in :lang emacs-lisp. elisp-demo has also been
reconfigured to search it instead.

Keep in mind that examples.org references a few things in as-of-yet
published documentation. This will be rectified soon.
2022-09-16 01:14:20 +02:00
Henrik Lissner
e71daf5cc3
tweak(emacs-lisp): elisp indentation for data/plists
This was adapted from
https://www.reddit.com/r/emacs/comments/d7x7x8/finally_fixing_indentation_of_quoted_lists/.
It fixes the indentation of quoted data (and plist keywords) so they're
indented like data, rather than function arguments, like so:

  BEFORE:
    `(foo bar baz
          doom emacs)
    '(:foo 1
           :bar 2
           :baz 3)
    '(:foo 1
           2
           3
           :bar 4)
    (:foo 1
          :bar 2)
    (:foo 1
          ;; test comment
          :bar 2)
    (:foo 1
          2
          :bar 3)

  AFTER:
    `(foo bar baz
      doom emacs)
    '(:foo 1
      :bar 2
      :baz 3)
    '(:foo 1
      2
      3
      :bar 4)
    ;; only align unquoted keywords if keywords start each line:
    (:foo 1
     :bar 2)
    (:foo 1
     ;; test comment
     :bar 2)
    (:foo 1
          2
          :bar 3)

Also, I added a way to declare that plists in an macro's arguments
should be indented like data:

  (put 'map! 'indent-plists-as-data t)

  BEFORE:
    (map! :localleader
          :map emacs-lisp-mode-map
          (:prefix ("d" . "debug")
                   "f" #'+emacs-lisp/edebug-instrument-defun-on
                   "F" #'+emacs-lisp/edebug-instrument-defun-off))

  AFTER:
    (map! :localleader
          :map emacs-lisp-mode-map
          (:prefix ("d" . "debug")
           "f" #'+emacs-lisp/edebug-instrument-defun-on
           "F" #'+emacs-lisp/edebug-instrument-defun-off))

There was a third improvement I was hoping to include, namely,
proper indentation of interpolated forms:

  BEFORE:
    `(foo
      bar
      ,(if t
           'baz
         'boo))

    `(foo
      bar
      (if t
          baz
        boo))

  AFTER:
  `(foo
    bar
    ,(if t
          'baz
        'boo))

  `(foo
    bar
    (if t
     baz
     boo))

But this was removed because it breaks indentation for quoted macro
forms (or dynamic elisp programming):

  BEFORE: (good)
    `(with-temp-buffer
       (if (always)
           (message
            "Hello %s"
            user-login-name)
         (message
          "Goodbye %s"
          user-login-name)))

  AFTER: (bad)
    `(with-temp-buffer
      (if (always)
       (message
        "Hello %s"
        user-login-name)
       (message
        "Goodbye %s"
        user-login-name)))

Ref: https://www.reddit.com/r/emacs/comments/d7x7x8/finally_fixing_indentation_of_quoted_lists/'
2022-09-16 01:14:20 +02:00
Henrik Lissner
afa154db27
refactor!(emacs-lisp): flycheck config in non-packages
BREAKING CHANGE: This performs the following backwards-incompatible
changes:

- Replaces `+emacs-lisp-reduce-flycheck-errors-in-emacs-config-h` with a
  `+emacs-lisp-non-package-mode` minor-mode.
- Removed the `+emacs-lisp-disable-flycheck-in-dirs` variable, as this
  mechanism no longer checks a directory list to detect a "non-package".

If you've referenced either of these symbols, you'll need to
update/remove them from your config. No extra config is needed
otherwise.

Why: Doom has always tried to reduce the verbosity of Flycheck when
viewing elisp config files or scripts (i.e. non-packages). These are so
stateful that the byte-compiler, package-lint, and checkdoc inundate
users with false positives that are more overwhelming than helpful.

The heuristic for this has always been a simple "is this file in
$DOOMDIR or $EMACSDIR", but this wasn't robust enough, especially in
cases where symlinking was involved, so I've employed a new, more
general heuristic for detecting non-package files:

- The file isn't a theme in `custom-theme-load-path`,
- The file doesn't have a (provide ...) or (provide-theme ...)
  statement whose first argument matches the file name,
- The file lives in a project with a .doommodule file (doom modules
  never have convention package files in them),
- Or the file is a dotfile (like .dir-locals.el or .doomrc).

I've also tweaked byte-compile-warnings to yield a little more output,
but not by much. Whether this is too permissive or not will require
further testing to determine.

What's more, I've updated this to reflect recent changes to Doom's
startup process (in c05e615).

Ref: c05e61536e
2022-09-12 11:45:56 +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
422baedad7
refactor(cli): load cli libs from doom.el
This simplifies the entry point for loading Doom (and/or its CLI
framework).
2022-08-07 19:43:28 +02:00
Henrik Lissner
1abcf913aa
revert: fix(docs): set mode in file-local vars
emacs-straight/org-mode@e22b4eb7aa introduced a breaking change that
made it impossible to rely on .dir-locals.el to change org-mode buffers
in $EMACSDIR to doom-docs-org-mode (without infinite recursion), so we
used file-local variables in 7e400ab.

emacs-straight/org-mode@215de6176b reverted that change, so we can use
.dir-locals.el again, and this is my preference, since it requires less
boilerplate across our hundreds of org files.

Ref: emacs-straight/org-mode@215de6176b
Ref: emacs-straight/org-mode@e22b4eb7aa
Revert: 7e400abdc0
2022-08-07 19:08:07 +02:00
Henrik Lissner
06db69bf76
fix(emacs-lisp): suppress popup warnings from flycheck
Typically caused by partial syntax errors in Doom Emacs (e.g. while
you're writing code in $EMACSDIR or $DOOMDIR, and haven't typed the
closing parenthesis yet).
2022-08-05 00:49:17 +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
7e400abdc0
fix(docs): set mode in file-local vars
Due to emacs-straight/org-mode@e22b4eb, a replacement major mode (for
org-mode) can no longer be specified from .dir-locals.el, as it spirals
into infinite recursion. Therefore, a mode: line is needed in all Doom
docs.

Ref: emacs-straight/org-mode@e22b4eb7aa
2022-08-03 02:46:33 +02:00
Henrik Lissner
1255315bfc
refactor(docs): replace nav menus with virtual one
Now that the header is dynamically generated (when doom-docs-mode is
active), a literal header is unnecessary.
2022-08-02 19:37:07 +02:00
Henrik Lissner
e77a45bc22
docs: use lowercase keywords
As per Org's new defaults, which we're adopting elsewhere, so may as
well adopt it here.
2022-08-02 16:23:43 +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
Henrik Lissner
a4aab45656
fix(emacs-lisp): flycheck false positives in Doom configs 2022-06-22 23:04:00 +02:00
Henrik Lissner
170dadca5a
feat(emacs-lisp): register doomscript as elisp interpreter 2022-06-21 23:42:16 +02:00
Henrik Lissner
d014a7ae8b
docs(emacs-lisp): add fn!/lambda! to ToC & tweak header-args 2022-06-21 23:32:02 +02:00