Commit Graph

3679 Commits

Author SHA1 Message Date
baafa0f635 Fix #1617: fd is used despite being absent 2019-07-29 15:05:26 +02:00
2b81233353 Clean up _upgrade rmeote after 'doom upgrade' 2019-07-29 03:47:56 +02:00
ba07fe575e Add {--no-{elpa,builds},-r,--repos} flags to 'doom purge' 2019-07-29 03:47:12 +02:00
8a16513107 Fix various errors in 'doom upgrade' 2019-07-29 03:34:35 +02:00
2304d69898 Fix wrong-type-arg number during 'doom upgrade' 2019-07-29 03:21:55 +02:00
c28fff4fbf Fix void-variable branch error on 'doom upgrade' 2019-07-29 03:18:39 +02:00
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
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
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
c2af0723d7 Show progress percentage during 'doom update' 2019-07-28 16:10:54 +02:00
19ecf8e46a Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
a354bba261 Appease byte-compiler-san-chan-sensei-sama-chama
Praise be.
2019-07-28 16:10:53 +02:00
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
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
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
1eacda2d5c Fix :fetcher warning to include package name 2019-07-28 10:00:36 -04:00
efb4584797 Alias 'doom build' to 'doom rebuild' 2019-07-28 14:02:51 +02:00
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
a6d77e951f Move doom-run-all-startup-hooks-h to autoload/debug.el 2019-07-28 02:32:25 +02:00
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
8dab8eefca Prevent load-file-name/#$ replacements in strings & comments 2019-07-27 22:57:32 +02:00
b332a923a5 Add in-house point-in-{comment,string} predicates
Toward uncoupling Doom from smartparens.
2019-07-27 22:56:49 +02:00
8d388ebba9 Improve 'doom rebuild' checks & formatting of logs
Corrects stale bytecode a little more aggressively.
2019-07-27 17:22:47 +02:00
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
402260f154 Fix doom/reload & doom/reload-autoloads 2019-07-27 17:04:17 +02:00
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
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
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
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
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
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
1a72cf0677 Minor, general refactors to package API 2019-07-26 20:17:30 +02:00
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
9c1c61752a Fix 'doom refresh' skipping purging step 2019-07-26 20:17:29 +02:00
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
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
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
f8c4d075a5 Fix doom purge reporting failure despite success 2019-07-26 20:17:29 +02:00
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
c2ae6f30a5 Don't compress auto-mode-alist
Modules may readd their entries afterwards, anyway.
2019-07-26 15:33:32 +02:00
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
e70998228a Fix doom-package-private-p 2019-07-26 15:25:30 +02:00
8834ba17e3 Only return non-nil if doom-packages-purge worked 2019-07-26 13:59:14 +02:00
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
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
331a53c0a1 Complain if envvar file exists, but isn't readable 2019-07-26 13:15:28 +02:00
e6201ca952 Add :if, :when, :unless & :cond support to doom! macro
Now you can conditionally enable/disable modules.
2019-07-26 12:05:13 +02:00
321b797046 cli/packages: fix infinite waiting on pkg update
Caused lecause straight is prompting for input in a headless
session *and* from a headless async child instance of Emacs. It waits
forever for input for a question we could never see or respond to.

How sad.
2019-07-26 11:54:37 +02:00
a146e61728 Remove DIR!, FILE! and def-advice! obsolete aliases 2019-07-26 03:12:07 +02:00
44c694da47 Make bin/doom options consistent & improve errors/docs 2019-07-26 03:12:07 +02:00