Commit Graph

3783 Commits

Author SHA1 Message Date
Henrik Lissner
d308cedf95
Update help output for 'doom install' 2019-09-08 20:41:22 -04:00
Henrik Lissner
4bc65a3f78
Prevent C-c C-p sandbox from loading private modules
And don't change doom-private-dir, as it isn't necessary and it affects
the purity of the test environment.
2019-09-06 15:37:40 -04:00
Henrik Lissner
280a2407ab
Fix doom-load-envvars-file
A former regexp consumed the first letter of each environment variable's
name.
2019-09-06 14:17:34 -04:00
Henrik Lissner
29055ae6a3
Disable projectile-{ag,ripgrep}
Emit warnings for commands that won't work, as is, and that Doom
already provides a better alternative for.
2019-09-06 14:17:34 -04:00
Henrik Lissner
3b7711420f
General comment revision & cleanup 2019-09-06 00:25:35 -04:00
Henrik Lissner
d559377534
Fix xclip exclusion on linux
Due to unintentionally inverted condition
2019-09-06 00:17:02 -04:00
Henrik Lissner
d665c7173a
Remove esup
Because esup is fundamentally incompatible with Doom, we are removing
it. Hopefully we can replace it later down the road.
2019-09-06 00:15:13 -04:00
Henrik Lissner
c0d2ab331e
Remove command-log-mode
This isn't vital enough a package to be included in core. Emacs already
provides view-lossage, and there are other, better packages for
displaying your keybinds as you type.

Even one that I've been working on (with special evil support):
https://github.com/hlissner/doom-emacs-private/blob/master/lisp/keycast.el
2019-09-06 00:13:40 -04:00
Henrik Lissner
f6b8807e83
Add -o option to 'doom env'
Now you can output envvar files where ever you like.
2019-09-05 14:20:50 -04:00
Henrik Lissner
9f08d11908
Also delete autoloads.pkgs.el on 'doom upgrade' 2019-09-05 14:06:52 -04:00
Henrik Lissner
6c4f4a9d9d
Mac users: command = super, option = meta
Apparently these have different defaults on emacs-mac, so we set these
to keep them consistent.
2019-09-05 13:11:22 -04:00
Henrik Lissner
cbe05e6df4
Soften formatting rules for envvar files
doom-load-envvar-file would fail if there weren't two newlines
indicating "the start of the envvar list", or if envvars were commented
out/were padded with whitespace. These rules have been relaxed.
2019-09-05 13:10:21 -04:00
Henrik Lissner
44ef61a7f7
Fix doom/help-packages 2019-09-03 16:53:41 -04:00
Henrik Lissner
005647fd64
Fix wrong-type-arg package-desc error on 'doom refresh' 2019-09-03 14:07:09 -04:00
Henrik Lissner
d9b6bf9438
Add doom-core-dir to load-path for child test processes 2019-09-03 01:53:29 -04:00
Henrik Lissner
338b72b898
Refactor test launcher 2019-09-03 01:47:32 -04:00
Henrik Lissner
81ee250c09
Minor refactor & revision across the board 2019-09-03 00:59:46 -04:00
Henrik Lissner
4ce86b06d4
Use more ambiguous reset target when normalizing repos
Possibly addresses "ambiguous target" errors during 'doom update'.

Might address #1738 and #1721
2019-09-03 00:59:46 -04:00
Henrik Lissner
62b089ba36
Refactor core & core-lib
And make their tests pass
2019-09-03 00:59:46 -04:00
Henrik Lissner
059ede53b6
Update all unit tests
To meet changes introduced from the straight branch merge.
2019-09-03 00:59:46 -04:00
Henrik Lissner
52b6c51914
Read packages.el files directly for doom-info
This is a little more accurate and affects less state of the current
session.
2019-09-03 00:38:29 -04:00
Henrik Lissner
65d3406e27
Fix various errors during 'doom compile' 2019-09-03 00:38:04 -04:00
Henrik Lissner
4b736bef68
Introduce doom-interactive-mode
As soft inverse alias for noninteractive; this makes it easier to unit
test functionality that depends on the session type.
2019-09-03 00:37:30 -04:00
Henrik Lissner
91b27bdccc
Remove doom--straight-use-local-dir-a advice
Unnecessary now that straight-base-dir exists.
2019-09-02 22:51:20 -04:00
Henrik Lissner
49fb34d1c1
Fix 'doom purge' trying to purge site packages
It should only manage packages installed in
doom-elpa-dir (~/.emacs.d/.local/elpa, by default).
2019-09-02 13:12:57 -04:00
Henrik Lissner
cd25abd7d2
Merge pull request #1735 from seanfarley/smf/add-timeout-arg
cli/upgrade: add timeout flag
2019-09-02 00:45:13 -04:00
Henrik Lissner
d1a299b9f5
Fix #1719: sole :when in def-project-mode! 2019-08-29 20:05:34 -04:00
Sean Farley
c55676d221 cli/upgrade: add timeout flag
Since there is a lot of logic in `bin/doom upgrade` than just running
two commands, I thought we should also add a timeout flag just like
`update` has.
2019-08-29 17:03:42 -07:00
Henrik Lissner
3a10e948aa
Fix #1718: void-function set-fontset-font
Occurs when Emacs is built without X server/GUI support.
2019-08-29 18:52:33 -04:00
Henrik Lissner
19899dac82
Fix inverted condition in package-archives assembly 2019-08-28 22:08:13 -04:00
Henrik Lissner
75fe17950e
Refactor doom-initialize-packages
Make it reinitialize more if FORCE-P is provided or doom-init-packages-p
is nil.
2019-08-28 16:46:39 -04:00
Henrik Lissner
7727920629
Rewrite doom/reload 2019-08-28 15:19:58 -04:00
Henrik Lissner
851b51357e
Fix #1712, #1719: project minor modes not activating 2019-08-28 15:17:40 -04:00
Henrik Lissner
464ebabc2a
Add warning to doom/reload (SPC h R) 2019-08-28 12:40:59 -04:00
Henrik Lissner
8cb1fe1874
Add setq! macro
A convenient alternative to setq where you don't have to care about load
order (no need for after! blocks).
2019-08-27 00:08:22 -04:00
Henrik Lissner
aad0b2f842
Change how unit tests are set up and run
Moves init.test.el to core/test/init.el and initializes the test
environment from within the current session, rather than through a bash
script middle man.

TODO: don't buffer the unit test results
2019-08-27 00:07:01 -04:00
Henrik Lissner
8766499b0d
Fix some file permissions errors
Occurs when deferred packages are loaded while in an unreadable or
non-existent directory.
2019-08-27 00:05:12 -04:00
Henrik Lissner
a5096ff86b
Add ELPA packages to doom info output 2019-08-27 00:05:12 -04:00
Henrik Lissner
ca574c60b0
Fix pushnew! inserting duplicates of complex types
Because it was using #'eql for comparison, which is insufficient for
compound datatypes, like strings.
2019-08-27 00:05:12 -04:00
Henrik Lissner
a567e2f85e
Remove pushmany! macro
It is redundant with prependq!, appendq! and pushnew!.
2019-08-27 00:05:12 -04:00
Henrik Lissner
8ac1e1a781
Refactor doom init process
- Refactors doom-initialize
- Moves doom-initialize-modules call to init.el, to more easily isolate
  it during unit testing.
2019-08-27 00:05:12 -04:00
Henrik Lissner
465122320d
Byte-compile Doom in the correct order
That is, modules should be byte-compiled in the order they're in in your
doom! block.
2019-08-23 20:30:39 -04:00
Henrik Lissner
205bf453de
Fix void-function doom--resolve-path-forms error
By using project-file-exists-p! macro instead.
2019-08-23 01:56:43 -04:00
Henrik Lissner
9d0966e94a
Forcibly refresh doom after 'doom upgrade'
Ensures autoloads files are regenerated.
2019-08-23 01:56:43 -04:00
Henrik Lissner
025a4c3d26
Properly reset packages on 'doom update'
Prevents some cases of infinite hanging while updating certain packages.
2019-08-22 16:13:23 -04:00
Henrik Lissner
e502031412
Fix 'doom purge' not regrafting all repos on first use 2019-08-22 16:12:22 -04:00
Henrik Lissner
aff5cc5b28
Move file-exists-p! to core/autoload/files.el 2019-08-22 13:03:12 -04:00
Henrik Lissner
eb567f51c8
Handle git submodules from 'doom update' 2019-08-22 13:02:24 -04:00
Henrik Lissner
970a31fc56
Enable ns-auto-titlebar-mode for mac users
ns-auto-titlebar-mode needs to be enabled for
ns-auto-titlebar-set-all-frames and ns-auto-tilebar-set-frame to work.
2019-08-21 21:12:52 -04:00
Henrik Lissner
94ba098e43
Normalize package before checks in 'doom update'
This reduces the likelihood that straight will throw up invisible
popups, blocking the update process indefinitely.
2019-08-21 18:34:55 -04:00
Henrik Lissner
3b9701161a
Fix build date in doom/version
When it is called interactively from a file outside of ~/.emacs.d
2019-08-21 12:17:32 -04:00
Henrik Lissner
879f3a660a
Use new straight-base-dir variable
We can't phase out doom--straight-use-local-dir-a until I fix the issue
with straight not reinstalling packages when their recipes change.
2019-08-21 00:29:12 -04:00
Henrik Lissner
40e6a37652
Expand on doom-module-load-path's docstring
Mention that value in the returned list is always doom-private-dir.
2019-08-21 00:10:24 -04:00
Henrik Lissner
0b2b5d1c6c
Install & track from straight.el's develop branch 2019-08-21 00:09:44 -04:00
Henrik Lissner
1cd219dfa7
Update the docstring for leader/localleader vars
They should be set in your private config.el, not init.el.
2019-08-19 21:04:54 -04:00
Henrik Lissner
2eb8035f15
Add more DEPRECATED tags
For Emacs 25 functionality that'll be removed when 25.x support is
dropped.
2019-08-19 21:04:11 -04:00
Henrik Lissner
b854a089eb
Sort & optimize package list on 'doom purge' 2019-08-18 11:24:44 -04:00
Henrik Lissner
2a3f95f615
Update line-number-display-width polyfill
It takes one argument in later versions of Emacs. This file really
shouldn't be visible to Emacs 25.x and earlier, but there has been one
case of it being indexed by Doom's autoload scanner.

Also marks the library with the new DEPRECATED tag. It will be removed
once Doom removes 25.x support.
2019-08-17 16:04:26 -04:00
Henrik Lissner
2b3f522858
Update :recipe example in dummy packages.el
Deployed by `doom quickstart`/`doom install`
2019-08-17 16:04:26 -04:00
Henrik Lissner
b2fd76cb49
Ensure straight is loaded on doom-initialize-packages
Without causing recursive require errors if called in an after! handler
for straight.
2019-08-15 19:56:20 -04:00
Henrik Lissner
8d3536fa77
Initialize package.el on doom-initialize-packages
So that packages installed via package.el are still available.
2019-08-15 19:52:43 -04:00
Henrik Lissner
bc8b6605db
Don't byte-compile straight
This eliminates the possibility of straight throwing an
emacs-version-changed error, which is difficult to catch, when uses
could invoke a straight command interactively and any time. We'll do our
own version checks (later).
2019-08-15 19:51:36 -04:00
Henrik Lissner
a7bdf6825a
Set default exec-path & shell-file-name
In case doom-load-envvars-file is called when these vars have local
bindings.
2019-08-15 18:42:26 -04:00
Henrik Lissner
d298a8e71c
Update envvar file comment header
Envvar files are now refreshed on `doom refresh`, if it exists. A while
back I removed the `doom env reload` step.
2019-08-15 17:29:08 -04:00
Henrik Lissner
4e016eb843
Merge pull request #1621 from ashtonbaker/fix-spelling
fix small spelling mistake in fonts.el
2019-08-15 15:02:17 -04:00
Henrik Lissner
5aa7415d87
Add -t/--timeout switch to 'doom update'
To get around timeout issues on slower connections or larger packages.
2019-08-15 01:34:28 -04:00
Henrik Lissner
b29a7ba8fe
Fix 'doom compile'
Fixes `void-function define-key!` error.
2019-08-15 01:33:40 -04:00
Henrik Lissner
374940b959
Persist scratch buffers more proactively
Prior to this change, scratch buffers were saved only when Emacs is
killed. In cases where Emacs doesn't die properly, you'd lose your
scratch contents. Now, they are persisted as soon as you close them.
2019-08-15 01:07:45 -04:00
Henrik Lissner
7ded14f548
Refactor scratch buffer init 2019-08-15 01:02:00 -04:00
Henrik Lissner
7d714b7531
Fix #1673: restore project-file-exists-p! macro 2019-08-14 22:36:19 -04:00
Ashton Baker
aa3538591a fix small spelling mistake in fonts.el 2019-08-12 14:47:39 -04:00
Henrik Lissner
702369e888
Move :ui tabbar to :ui tabs
And update its README.org
2019-08-11 02:05:09 -04:00
Henrik Lissner
856a2afe43
Add delete! convenience macro
And polish delq!'s docstring.
2019-08-11 02:05:09 -04:00
Henrik Lissner
2cd9685758
Discard timed out future correctly on 'doom update'
And list packages immediately after message (no newlines).
2019-08-09 22:23:38 -04:00
Henrik Lissner
624c5e1a71
Complain about unknown targets in 'doom compile' #1657 2019-08-09 22:23:37 -04:00
Henrik Lissner
48415edce3
Fix #1644: --restore switch not recognized 2019-08-08 23:30:16 -04:00
Henrik Lissner
0a44881df1
Increase number of sub-processes for 'doom update' 2019-08-08 23:00:54 -04:00
Henrik Lissner
c266680c11
Fix #1653: uncaught error when async process times out 2019-08-08 22:59:57 -04:00
Henrik Lissner
115a436273
Fix 'doom update' for chemacs users
Or users who have Doom in a non-standard location (i.e. outside
~/.emacs.d).
2019-08-08 11:48:13 -04:00
Henrik Lissner
956b8cc532
Merge pull request #1619 from filalex77/fix-doom-reload-packages
Require straight.el in doom/reload-packages
2019-08-07 21:48:10 -04:00
Henrik Lissner
ef60762a92
Fix wrong-type-arg: listp error on 'doom update'
Caused when async fails to create a child process for a certain group of
packages (needs to be investigated more).
2019-08-07 21:07:43 -04:00
Henrik Lissner
f42bfde8ae
Fix #1648: doom upgrade not updating packages
...when Doom itself is up-to-date.
2019-08-07 20:55:56 -04:00
Henrik Lissner
4a92d12267
Fix void-variable package error on 'doom update' 2019-08-07 17:22:46 -04:00
Henrik Lissner
b808c4e1ab
Reload autoloads files in noninteractive sessions
After it's been regenerated, so that any hacks (*cough*org/magit*cough*)
are in scope.
2019-08-07 16:55:04 -04:00
Henrik Lissner
87358db85e
Fix void-function mapcan on Emacs 25.x 2019-08-07 16:54:47 -04:00
Henrik Lissner
c8d6ab823b
Update documentation for 'doom env' 2019-08-07 01:42:46 -04:00
Henrik Lissner
b34a542ca0
Fix over-eager whitespace-mode after switching major modes
Some major modes (like rust-mode) may trigger
doom-highlight-non-default-indentation-h twice, causing whitespace-style
to be set to its default global value, which (by default) enables
whitespace-mode with all its features. This may overwhelm the
unsuspecting user, so we instead only tack on our modifications to
whitespace-style to its existing buffer-local value, rather than its
global value.
2019-08-06 20:38:04 -04:00
Henrik Lissner
29e851da27
Try counsel-file-jump before project-find-file-in
The former is more reliable (and faster, with the fd/rg hack in the next
commit).

Also (hopefully) fixes the "cl-no-applicable-method: No applicable
method: project-roots" error emitted when project-find-file-in fails to
identify the target as a project root.
2019-08-06 19:43:38 -04:00
Henrik Lissner
3423974234
Minor refactors & tweaks across the board 2019-08-06 14:50:42 -04:00
Henrik Lissner
3e4c02f92f
Resolve symlinks in doom-emacs-dir
Shaves a little time off startup on slower drives.
2019-08-06 14:46:15 -04:00
Henrik Lissner
eb0ae8622c
Fix file paths in comment headings 2019-08-06 14:45:55 -04:00
Henrik Lissner
80988a7ad4
Fix kill-current-buffer advise supressing exwm hooks 2019-08-06 14:37:46 -04:00
Daniel Koning
2d28808121 Correct argument name in `defadvice!' docstring 2019-08-05 18:27:56 -05:00
Oleksii Filonenko
ec45c9367a
Require straight.el in doom/reload-packages
Because it's not loaded for some reason.

Also, require is not a big problem IMO: if you run this interactively, the
require cost probably doesn't matter much already.

Fixes #1618.
2019-07-30 14:47:19 +03:00
Henrik Lissner
54edffc4bb
cli/packages: emit a little more debug info
To mark the start of purging/regrafting procedures.
2019-07-29 21:29:43 +02:00
Henrik Lissner
435436e390
Fix 'doom purge' failing to delete build directory 2019-07-29 21:18:49 +02:00
Henrik Lissner
7559949e09
Rewrite 'doom purge'; add repo regrafting
'doom purge -r' now re-grafts shallow cloned packages (compacting them
as much as possible).
2019-07-29 21:09:23 +02:00
Henrik Lissner
99c73cea0b
setq-hook!: don't append setq hooks
Now settings can take effect in time for hooks that could see them.
2019-07-29 21:09:23 +02:00
Henrik Lissner
c3e2ec0157
Redesign straight initialization #1610 #1607
Straight throws an 'emacs-version-changed' error if you load it with a
version of Emacs it wasn't compiled with. This update causes this to
emit a more helpful error.
2019-07-29 21:09:21 +02:00
Henrik Lissner
87fd81281f
Rewrite 'doom update'
- Is now much more fault tolerant (produces better errors)
- Now handles async.el process errors as well
- Standardizes data structure of thread responses
2019-07-29 21:01:46 +02:00
Henrik Lissner
da954aa361
Improve 'doom build' reporting & checks
- Fix 'doom build' not byte-compiling stale dependencies of rebuilt
  packages.
- Fix 'doom build' logging the wrong number of packages that were
  rebuilt.
2019-07-29 20:59:52 +02:00
Henrik Lissner
4e305dd2ab
Fix bin/doom misinterpreting wrong-num-of-args errors 2019-07-29 20:58:02 +02:00
Henrik Lissner
c32244ad4e
Generalize doom-sh
And slightly reformat 'doom upgrade' "you have updates" message.
2019-07-29 20:57:20 +02:00
Henrik Lissner
19b6e82dc4
Change package! :recipe to extend default recipe
Instead of replacing the whole recipe with the contents of :recipe, only
modify the specified properties. This allows you to specify helpful
parameters like :nonrecursive or :depth without having to include the
full recipe.
2019-07-29 17:22:27 +02:00
Henrik Lissner
baafa0f635
Fix #1617: fd is used despite being absent 2019-07-29 15:05:26 +02:00
Henrik Lissner
2b81233353
Clean up _upgrade rmeote after 'doom upgrade' 2019-07-29 03:47:56 +02:00
Henrik Lissner
ba07fe575e
Add {--no-{elpa,builds},-r,--repos} flags to 'doom purge' 2019-07-29 03:47:12 +02:00
Henrik Lissner
8a16513107
Fix various errors in 'doom upgrade' 2019-07-29 03:34:35 +02:00
Henrik Lissner
2304d69898
Fix wrong-type-arg number during 'doom upgrade' 2019-07-29 03:21:55 +02:00
Henrik Lissner
c28fff4fbf
Fix void-variable branch error on 'doom upgrade' 2019-07-29 03:18:39 +02:00
Henrik Lissner
e3d6d13be5
Fix doom/help-packages
Also adds doom-package-backend function.

TODO: Report more information about straight packages.
2019-07-29 03:18:38 +02:00
Henrik Lissner
1033087beb
Merge pull request #1609 from tchajed/fix-fetcher-warning
Fix :fetcher warning to include package name
2019-07-28 16:33:23 +02:00
Henrik Lissner
ff5be98cec
Disable show-trailing-whitespace by default #1593
Let people decide if they want it on or not.

See doom-enable-show-trailing-whitespace-h or setq-hook!
2019-07-28 16:10:54 +02:00
Henrik Lissner
c2af0723d7
Show progress percentage during 'doom update' 2019-07-28 16:10:54 +02:00
Henrik Lissner
19ecf8e46a
Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
Henrik Lissner
a354bba261
Appease byte-compiler-san-chan-sensei-sama-chama
Praise be.
2019-07-28 16:10:53 +02:00
Henrik Lissner
8773d85db0
Fix oversights in plist library
- doplist! now returns the RETVAL expression
- Fix doom-plist-merge (was incomplete)
2019-07-28 16:10:53 +02:00
Henrik Lissner
3330501af6
Remove examples in custom-*set-faces!
They're already in docs/api.org, which helpful buffers will display
alongside a function/macro's documentation.
2019-07-28 16:10:53 +02:00
Henrik Lissner
529f8d7e7a
Fix custom-theme-set-faces!
The body was still quoted from when it was a macro.
2019-07-28 16:10:53 +02:00
Tej Chajed
1eacda2d5c
Fix :fetcher warning to include package name 2019-07-28 10:00:36 -04:00
Henrik Lissner
efb4584797
Alias 'doom build' to 'doom rebuild' 2019-07-28 14:02:51 +02:00
Henrik Lissner
a9c1986a68
Fix and refactor 'doom upgrade' #1607
Now accepts the -f/--force switches to discard local changes to
the .emacs.d directory.
2019-07-28 13:47:57 +02:00
Henrik Lissner
a6d77e951f
Move doom-run-all-startup-hooks-h to autoload/debug.el 2019-07-28 02:32:25 +02:00
Henrik Lissner
4dc42de9e3
def-command! -> defcli!
And def-command-group! -> defcligroup!, to match our new convention for
naming definer macros.
2019-07-28 02:32:25 +02:00
Henrik Lissner
8dab8eefca
Prevent load-file-name/#$ replacements in strings & comments 2019-07-27 22:57:32 +02:00
Henrik Lissner
b332a923a5
Add in-house point-in-{comment,string} predicates
Toward uncoupling Doom from smartparens.
2019-07-27 22:56:49 +02:00
Henrik Lissner
8d388ebba9
Improve 'doom rebuild' checks & formatting of logs
Corrects stale bytecode a little more aggressively.
2019-07-27 17:22:47 +02:00
Henrik Lissner
a441435f3e
Fix debug helper for format!
Throwing format errors when there are no arguments.

Also makes relpath a little more lenient about nil/empty input.
2019-07-27 17:05:17 +02:00
Henrik Lissner
402260f154
Fix doom/reload & doom/reload-autoloads 2019-07-27 17:04:17 +02:00
Henrik Lissner
3c36a345d8
Fix file! not returning filename in some cases
There are scenarios where load-file-name is set, but load-in-progress is
not. It is safe to assume the value of load-file-name is always what we
want.

Also: file! now throws an error if it can't find the directory.
Otherwise we have to deal with roundabout errors from other places that
expect file! to never fail.
2019-07-27 17:00:12 +02:00
Henrik Lissner
21a27b52d8
Refactor autoloads generation
- Correctly replace references to load-file-name and $# in autoloads.
- Don't load resulting autoloads file twice
- Read package autoloads literally (a little faster)
2019-07-27 16:59:10 +02:00
Henrik Lissner
0dfdbd471c
Ensure envvars at top of envvar file are checked
The regexp expects there to be at least one newline at the top of the
file, otherwise the very first envvar is skipped.
2019-07-27 02:46:50 +02:00
Henrik Lissner
597ef77c20
Ignore envvars prefixed with __
They are likely private. There are some public variables with single
underscore prefixes, however, like _FASD_DATA and _FASD_VIMINFO.
2019-07-27 02:46:49 +02:00
Henrik Lissner
fe5d285a50
scroll-conservatively = 10
Match the vim default behavior of recenting the cursor in the window if
it moves more than 10 lines above or below the ends of the window.
2019-07-27 02:46:49 +02:00
Henrik Lissner
4d73f659f5
Refactor out nested hook defuns & refactor core.el
Moves file-handling config to core-editor.el.
2019-07-27 02:46:49 +02:00
Henrik Lissner
1a72cf0677
Minor, general refactors to package API 2019-07-26 20:17:30 +02:00
Henrik Lissner
6fcaa80355
Improve autoloads mtime scanning on packages
Scan source files in build directory rather than repos, which are better
indicators of a stale autoloads file.
2019-07-26 20:17:30 +02:00
Henrik Lissner
9c1c61752a
Fix 'doom refresh' skipping purging step 2019-07-26 20:17:29 +02:00
Henrik Lissner
38b69785dd
Don't load pkg autoloads in non-interactive sessions
Fixes an issue where autoloads would bloat load-path and auto-mode-alist
with duplicates because they were build on top of old autoloads state.

We initialize packages manually at the start of non-interactive sessions
anyway.
2019-07-26 20:17:29 +02:00
Henrik Lissner
08ba22c653
Minor refactor/reformatting of doom-initialize
- No need to use after! (it has a little magic associated with it that are
  meaningless this early in the startup process), so we use
  with-eval-after-load instead.

(And I've been itching for an excuse to use doom-rpartial)
2019-07-26 20:17:29 +02:00
Henrik Lissner
a10693886e
Fix double-rebuilding & lingering stale elc files
This update addresses two evasive issues:

1. Packages updated with `doom update` would not rebuild correctly,
   requiring a `doom refresh` afterwards,
2. Packages would fail to rebuild even if their byte-compiled files were
   stale. The result: "*.el is newer than *.elc" warnings at startup.
2019-07-26 20:17:29 +02:00
Henrik Lissner
f8c4d075a5
Fix doom purge reporting failure despite success 2019-07-26 20:17:29 +02:00
Henrik Lissner
a3e262c7ac
💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
Henrik Lissner
c2ae6f30a5
Don't compress auto-mode-alist
Modules may readd their entries afterwards, anyway.
2019-07-26 15:33:32 +02:00
Henrik Lissner
486e21ab44
Refactor doom-info; remove doom-find-packages
The function was overcomplicated and wasn't any more useful than looking
directly at doom-packages
2019-07-26 15:25:59 +02:00
Henrik Lissner
e70998228a
Fix doom-package-private-p 2019-07-26 15:25:30 +02:00
Henrik Lissner
8834ba17e3
Only return non-nil if doom-packages-purge worked 2019-07-26 13:59:14 +02:00
Henrik Lissner
88096a81a9
merge whitespace-style with global value, not local
And ensure it runs as late as possible in after-change-major-mode-hook.

Hopefully to increase the probability of
doom-highlight-non-default-indentation-h detecting a user-enabled
whitespace-mode and bowing out in time.
2019-07-26 13:57:42 +02:00
Henrik Lissner
9311744f7f
Restore comment header in envvar files
`shell-command` erases the target buffer before piping output to it.
Which means the envvar file comment header was wiped out. This causes
trouble for the envvar file parser, which expects the envvar list to
start with two newlines.
2019-07-26 13:38:13 +02:00
Henrik Lissner
331a53c0a1
Complain if envvar file exists, but isn't readable 2019-07-26 13:15:28 +02:00