Commit Graph

9794 Commits

Author SHA1 Message Date
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
6a9a127b0f lang/emacs-lisp: add popup rule for buttercup results 2019-07-26 13:59:52 +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
ca295e4c79 Refactor evil-collection initialization
- Update comments
- Add code for easily refreshing evil-collection-mode-list
- Load evil-collection-term for multi-term
- Fix buffer-menu, image-mode, elisp and occur modules not loading
2019-07-26 03:12:07 +02:00
02f2ad1e8d lang/common-lisp: conform to new conventions 2019-07-26 03:12:07 +02:00
a146e61728 Remove DIR!, FILE! and def-advice! obsolete aliases 2019-07-26 03:12:07 +02:00
2122a31962 Add new instanced test runner
This will run the unit tests for each module in a separate Emacs
instance. It's a fair bit slower, but much more useful for something as
stateful as an Emacs config.

Now I just need to push the rewritten tests.
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
829ad8c8b7 cli/packages: refactor doom-packages-purge
Sets it up for a later update where purging repos will no longer be the
default behavior.
2019-07-26 03:12:06 +02:00
905ba1d23c Refactor autoloads byte-compilation
- Let-bind byte-compile-* vars instead of using file-local vars.
- Fix duplicate bullet point in "Copied backup..." message.
- Only display refresh message if cli command was successful.
2019-07-26 03:12:06 +02:00
d00c5a0de5 Add doom-cli-post-{failure,success}-execute-hook vars
To replace doom-cli-post-execute-hook. Now only displays "refresh"
message after a successful command.
2019-07-26 03:12:06 +02:00
bdcb156b91 Manually finalize straight transactions
Straight expects to be used interactively, which don't do (yet). Its
transactional system depends on idle timers, which don't run in a
noninteractive session, so we have to nudge it ourselves.
2019-07-26 03:12:06 +02:00
2aa7dbfb27 cli/packages: refactor doom-packages-update
- Now handles errors from threads gracefully, rather than failing
  silently.
- Exploits straights modification system to trigger rebuilds
  later (instead of force-rebuilding after each update).
2019-07-26 03:12:06 +02:00
a47351c58f lang/emacs-lisp: add test localleader keys for buttercup 2019-07-26 03:12:06 +02:00
7d9e844e35 docs/api: add custom{,-theme}-set-faces! entry 2019-07-26 03:12:06 +02:00
ecb655dc01 Add nested face support to custom-theme-set-faces!
And convert it and custom-set-faces! to functions because they didn't
need to be macros.
2019-07-26 03:12:06 +02:00
5cc0e92a48 lang/sh: append "/bin/*" rule in auto-mode-alist
It's too aggressive. Rather, it should be a fallback.
2019-07-26 03:12:06 +02:00
b24d7506e6 lang/sh: conform to new hook conventions 2019-07-26 03:12:05 +02:00
4aa577ca3d Merge pull request #1594 from filalex77/fix-lambda-prefix-quoting
Fix quoting of command in λ!!
2019-07-25 20:39:18 +02:00
62741a4214 Remove quoting in λ!! 2019-07-25 20:50:54 +03:00
4299da1eb8 :after -> :after-while for load-theme advice
The advice shouldn't run if load-theme doesn't return
non-nil (indicating it succeeded).
2019-07-25 01:50:33 +02:00
b1b2eba984 ui/tabbar: set variables sooner
Giving the using a chance to customize them before centaur-tabs-mode is
activated.
2019-07-25 01:49:15 +02:00
017aa6a9f7 editor/rotate-text: conform to hook conventions
And add it<->xit and describe<->xdescribe rotate-text patterns (for
buttercup tests).
2019-07-24 22:13:19 +02:00
e0fe2a85d1 Ensure doom-projectile-fd-binary is never nil 2019-07-24 17:09:51 +02:00
03a4461d3b Indent use-package! the same as use-package 2019-07-24 16:53:33 +02:00
b8837ac022 Fix keyword type check in doom-keyword-name 2019-07-24 15:26:43 +02:00
f25ec72253 lang/cc: fix stringp errors when loading rtags
Binary checks for rtags expect rtags-rc-binary-name and
rtags-rdm-binary-name to always be non-nil.
2019-07-24 15:25:42 +02:00
650e9049f0 Autoload hl-fill-column-mode
Because the package doesn't, for some reason.
2019-07-24 15:25:24 +02:00
ba990a6c9d Build package autoloads in install order #374
Before this update, the autoloads files were collected in
lexicographical order (by traversing straight's build directory). By
using straight--build-cache's keys (which are entered in the order they
were registered) we avoid issues like
2019-07-23 21:54:50 +02:00
629249aa43 Enable git-gutter on find-file-hook and org-mode
And disable it in pdf-view-mode. Perhaps this is too comprehensive?
2019-07-23 20:43:35 +02:00
d55f284386 Refactor file-exists-p macro
And refactor too doom--resolve-path-forms
2019-07-23 20:43:24 +02:00
d95acb4caa Change λ!! to a function
It doesn't need to be a macro
2019-07-23 19:09:29 +02:00
302ec4e97a lang/org: fix and autoload org-release hack
- Lazy load all the things.
- Now org-release return a sane version string, which should address
  packages using it to version check org.
2019-07-23 18:36:18 +02:00
fec53f7b1d Fix git-gutter not updating when whole file is staged
But we don't want it triggering on git-gutter:*-hunk, because they do
their own refreshing work.
2019-07-23 18:18:43 +02:00
003febd54c Refactor doom--define-leader-key helper
And mark it as a hack, which it is, Mr. Anderson.
2019-07-23 18:14:49 +02:00
58ab20ec5f Fix prependq!
Used one too many levels of nesting
2019-07-23 18:10:40 +02:00
3b9838ed41 lang/org: prevent circular refs in nconc'ed list 2019-07-23 18:05:28 +02:00
8931718e8a config/literate: fix org-version errors 2019-07-23 17:56:37 +02:00
dc9766ca37 lang/org: move org version hack to init.el
So that it's visible to external org tools, like org-tangle or the
literate module.
2019-07-23 17:51:35 +02:00
876bed4813 Remove deprecated :map* & :keymap from map! macro
These have been deprecated for some time. They are all aliases for :map.
2019-07-23 17:35:56 +02:00
9eaee096c8 Minor comment revision & general code reformatting 2019-07-23 17:30:32 +02:00
be46d31866 Use display-multi-font-p check in all-the-icons advice
display-multi-font-p is just an alias for display-graphic-p, but it
communicates better the purpose of this advice.
2019-07-23 17:27:55 +02:00