Commit Graph

3234 Commits

Author SHA1 Message Date
ff42cf0767 Rewrite require! and change depends-on!
depends-on! was changed to no longer load a specified module's
packages.el, but to preform a module-enabled assertion. It emits an
error if the linked module isn't (or specified flags aren't) enabled.
2019-04-21 19:40:02 -04:00
03b76e1789 Fix deprecated modules not passing on their flags
Also fixes redundant deprecated-module warnings from 'bin/doom refresh'.
2019-04-21 18:54:57 -04:00
4278eb683f Autoload projectile-add-known-projects
This should be PRed upstream at some point
2019-04-20 19:25:10 -04:00
f61e0aa00c Use outline-mode comment headings in core.el 2019-04-20 02:18:49 -04:00
3e74b339c7 Revise featurep! docstring & error message 2019-04-20 02:18:49 -04:00
123f7174ed Revise docstrings for scratch buffer commands 2019-04-19 20:50:53 -04:00
99c26e2fc2 Allow doom-project-find-file on arbitrary paths
- If DIR is not in a valid project, index it as normal and do
  projectile-find-file from current directory (but do not cache).
- If DIR is a valid project, but not the project root, fall back to
  different mechanism for exploring it (project-find-file,
  counsel-file-jump, or find-file).
- If DIR is a valid project AND is the project root, use
  projectile-find-file as normal.

This is to make doom-project-find-file more do-what-I-mean.
2019-04-19 20:48:48 -04:00
79ee09d65b Replace :ui evil-goggles w/ :ui ophints
Now offers op hinting for non-evil users.
2019-04-19 17:26:26 -04:00
25a86c18c8 Fix quiet! not returning BODY's return value 2019-04-19 13:30:39 -04:00
1136e9f49b Improve doom/describe-module
Opens module's README.org, if present, otherwise it prompts if you want
to browse the module's root.
2019-04-17 18:37:52 -04:00
863fc1a6bb Add buffer-live-p check to doom-real-buffer-p 2019-04-17 11:29:41 -04:00
6cd30c926b Persist scratch buffer across sessions
- Adds doom/open-project-scratch-buffer (persistent project scratch
  buffers)
- Prefix arg = open scratch buffer in current window, for both
  doom/open-scratch-buffer and doom/open-project-scratch-buffer.
- Rename doom/delete-scratch-files ->
  doom/delete-persistent-scratch-file
- Remove doom-scratch-buffer-display-fn
- Rename doom-scratch-files-dir -> doom-scratch-dir
- Add SPC p s keybind to open project scratch buffer
2019-04-17 11:15:56 -04:00
20a63a35ab Reformat doctor output & add DOOMDIR check
- Will now warn you if both .doom.d and .config/doom exists.
- Include branch and last commit date in doctor/info, next to Doom
  version.
- Issues in Doom core are now indented.
2019-04-16 20:57:03 -04:00
f37b1342a2 Don't show hostname in doom info or doctor output
It doesn't help me, and some folks may not want it publicized.
2019-04-16 20:57:03 -04:00
068a324fd1 Fix which-key labels for alt leader key #1332
Also mentioned in #1240
2019-04-16 10:56:26 -04:00
4724d0a109 Fix #1323: void-variable projectile-project-root 2019-04-11 18:29:26 -04:00
83cba583a7 with-eval-after-load -> after!
So :desc is ignored if which-key is disabled.
2019-04-11 18:29:23 -04:00
500878c882 Enlargen command-log window slightly 2019-04-10 19:25:21 -04:00
31eb845f6b Reset more state on doom/module initialization
Makes `doom/reload` a little more reliable and the side effects of
`doom-initialize`/`doom-initialize-modules` a little more deterministic.
2019-04-09 03:43:13 -04:00
defd60b24b Fix doom quickstart not installing packages
If the user had no ~/.doom.d/init.el to begin with, and never reads it
after it's been created (by `doom quickstart`), then Doom can't possibly
know what modules to install packages for, therefore no packages get
installed!
2019-04-09 03:31:05 -04:00
d3a12a3914 Refactor projects api
Improves correctness of projectile project state. Namely, prevents
projectile-project-root from poisoning the return value of
doom-project-root or doom-project-p, which may be causing an elusive bug
where doom-project-find-file is searching the wrong directory.
2019-04-09 03:13:18 -04:00
f9b6f6746f General, minor refactor/reformatting 2019-04-08 23:03:19 -04:00
742687a51e Add delq! and pushnew! macros
And move projectile configs to their respective modules (and out of
package configs).
2019-04-08 23:01:30 -04:00
5f09c9c634 Fix map! tests wrt 1fab389d 2019-04-08 15:27:20 -04:00
3b352143c0 Fix commandp errors on {local,}leader keys
General would read (function ...) forms unevaluated, as a list, rather
than a function symbol.
2019-04-08 14:06:18 -04:00
a4283427f5 Fix autoloaded hydras
They weren't marked as interactive, making them unavailable for `M-x` or
keybinds.
2019-04-07 16:06:52 -04:00
1fab389d9e Fix #1310: use internal macro for leader binds
Creates a separate doom--define-leader-key macro for internal use (in
map!). define-leader-key! will continue to exist as a convenience macro
for users who want a general.el interface to defining leader keys.

Possibly relevant to: #1309
2019-04-07 15:55:16 -04:00
182ab918b6 Enable xterm-mouse-mode in tty Emacs 2019-04-06 11:13:28 -04:00
43bc14d38e Undo noop'ed leader binds for missing commands
This was too magical and caused more confusion than the void-function
and commandp errors before it.

Addresses #1309, #1308
Relevant to #1217
2019-04-06 11:13:17 -04:00
2b7c215aee Refactor byte-compile dispatchers
And don't implicitly compile ~/.emacs.d/init.el unless :core (or no
args) are passed.
2019-04-06 00:11:32 -04:00
337c16cb68 Dear byte-compiler, you drive me to drink,
About Emacs Lisp that I have to rethink.
The world could end,
And humanity transcend,
But you'd still be here raising a stink.
2019-04-05 23:52:29 -04:00
45c9fb982d Add docstring to switch-{buffer,window,frame} hooks 2019-04-05 22:50:09 -04:00
9d65619d3e Fix keybinds to keymaps being ignored 2019-04-05 03:43:27 -04:00
5be0e2be4a Omit private module on doom compile
The private module won't be byte-compiled implicitly anymore, as it can
cause unexpected problems with stale code and config portability.

doom compile          -> only compiles ~/.emacs.d
doom compile :core    -> ~/.emacs.d/core
doom compile :plugins -> ~/.emacs.d/.local/packages/elpa
doom compile :private -> ~/.doom.d
2019-04-05 03:19:38 -04:00
d6c9520d93 Don't bind missing commands to leader keys
I don't want to litter config/default/+evil-bindings.el with conditions
for every keybind whose module may or may not be enabled. It impacts its
readability and is relatively expensive (due to the internals of map!
and general).

So instead, we no-op keybinds for commands that don't exist (and aren't
autoloaded), so you don't see missing function errors when using these
keys.
2019-04-05 02:52:49 -04:00
fe6dfb08b6 Add doom/kill-project-buffers command
Prompts for an open project and kills all its buffers.  This is useful
for closing `.emacs.d` in an effort to get some *billable* work done.

Added `doom-fixup-windows` and `doom-kill-buffer(s)-fixup-windows`
helper functions for leaving affected windows on a real buffer or the
fallback buffer.

Fixed `doom/kill-this-buffer-in-all-windows` to properly "fixup"
windows.
2019-04-05 16:04:26 +10:00
ea3d9e2957 Refactor & optimize define-leader-key!
- Provides a 10-30% boost in startup time
- which-key advice is no longer needed
2019-04-05 01:24:16 -04:00
23467374f5 Fix doom/forward-to-last-non-comment-or-eol #1306
This command would no-op if used in major modes with "fake" comments.
i.e. modes where "comments" are merely highlighted as comments, but have
no comment entry in its syntax table. e.g. text-mode + git-commit-mode.
2019-04-04 15:13:48 -04:00
2a079e2733 Load env even in tty Emacs
Even if it matches the current shell (or doesn't), the env file should
be the authority.
2019-04-03 01:53:20 -04:00
700cda370b Refactor doom env
- Limits process-environment during scraping
- Add `doom-env-executable` and `doom-env-switches` variables
- Announce what commands were run to produce your env var within env var
  file header
2019-04-03 00:09:22 -04:00
34e3985409 Remove doom/open-env
This file shouldn't be edited by hand anyway.
2019-04-02 20:09:44 -04:00
fd48329c36 Reset exec-path/shell-file-name on doom/reload-env 2019-04-02 00:55:43 -04:00
cd68044b5d Merge pull request #1299 from jochu/patch-1
Escape key regexps when building which-key leader prefix
2019-04-02 00:30:05 -04:00
7dcc4fc55b Merge pull request #1302 from shanavas786/fd-ex-name
Use variable for `fd-find` binary name
2019-04-02 00:27:33 -04:00
390edee702 ui/fci -> fill-column: replace fci w/ hl-fill-column
fci was buggy, slow and presented numerous incompatibilities with other
modes. It is also unmaintained.

Relevant to #1045
2019-04-01 13:44:20 -04:00
a6cc66e21e Refresh exec-path & shell-file-name
When loading envvars, since `load-env-vars` only affects the environment
and not Emacs' variables.
2019-04-01 13:15:15 -04:00
d974acfef1 Use variable for fd-find binary name 2019-04-01 12:18:12 +05:30
ec76d9acb6 Escape key regexps when building which-key leader prefix 2019-03-31 12:38:42 -07:00
7488b51e9a Prevent void-function load-env-vars errors
In case load-env-vars hasn't been autoloaded yet.
2019-03-29 01:51:36 -04:00
803ca2863a Use resolved, absolute paths in doom-project api
Ensures projectile caches files under the right key.
2019-03-28 19:57:34 -04:00