Commit Graph

3507 Commits

Author SHA1 Message Date
Henrik Lissner
182ab918b6
Enable xterm-mouse-mode in tty Emacs 2019-04-06 11:13:28 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
45c9fb982d
Add docstring to switch-{buffer,window,frame} hooks 2019-04-05 22:50:09 -04:00
Henrik Lissner
9d65619d3e
Fix keybinds to keymaps being ignored 2019-04-05 03:43:27 -04:00
Henrik Lissner
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
Henrik Lissner
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
Andrew Whatson
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
34e3985409
Remove doom/open-env
This file shouldn't be edited by hand anyway.
2019-04-02 20:09:44 -04:00
Henrik Lissner
fd48329c36
Reset exec-path/shell-file-name on doom/reload-env 2019-04-02 00:55:43 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Shanavas M
d974acfef1 Use variable for fd-find binary name 2019-04-01 12:18:12 +05:30
Jeffrey Chu
ec76d9acb6
Escape key regexps when building which-key leader prefix 2019-03-31 12:38:42 -07:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
c0b00327c2
Purge excess from projectile's cache
Bloated projectile caches can cause freezing and delays. This is
especially so if you accidentally index $HOME or /, which will bloat
them into the hundreds of MBs.

+ Adds purging of blacklisted, over-sized and non-projects from
  projectile's cache when Emacs is killed.
+ Projectile's project file cache will now expire after a week.
+ Corrects file paths in core/doctor's filesize checks.
2019-03-28 19:57:34 -04:00
Henrik Lissner
0085d089f3
Refactor doom*projectile-locate-dominating-file 2019-03-28 16:43:04 -04:00
Henrik Lissner
ece7b8fdcd
Fix doom-project-find-file on non-project DIRs
This function should be as DWIM as possible.
2019-03-28 15:07:14 -04:00
Henrik Lissner
7b8a2fcff8
Don't capture INSECURE, DEBUG & YES envvars
They should be transient.
2019-03-28 14:47:31 -04:00
Henrik Lissner
af37f9af58
Fix wrong-number-args error on doom env 2019-03-28 13:30:39 -04:00
Henrik Lissner
eb1296387f
Make load-env-vars a core package
Fixes a race condition where the load-env-vars package is used before it
was (or could be) installed.
2019-03-28 13:30:39 -04:00
Henrik Lissner
9b97631ddf
Fix typo in env file template 2019-03-28 02:25:28 -04:00
Henrik Lissner
2f0ad0e269
Fix -y/--yes/YES in doom quickstart 2019-03-28 02:24:19 -04:00
Henrik Lissner
b3d931d7ce
Refactor undo-tree advice 2019-03-28 01:56:09 -04:00
Henrik Lissner
37525bb1bd
Fix clipboard support on Windows #1284
Windows uses UTF-16 for clipboard content. selection-coding-system is
set correctly on Windows systems so we leave it to its default there.
2019-03-28 01:56:09 -04:00
Henrik Lissner
2dc52bc9be
💥 Replace exec-path-from-shell w/ 'bin/doom env'
IMPORTANT: This is a breaking update for Mac users, as your shell
environment will no longer be inherited correctly (with the removal of
exec-path-from-shell). The quick fix is: 'bin/doom env refresh'. Also,
the set-env! autodef now does nothing (and is deprecated), be sure to
remove calls to it in your config.

Smaller changes:
+ This update also adds --no-* switches to doom quickstart
+ Includes general improvements to the documentation of several bin/doom
  commands.
+ Moves doom/reload* commands to core/autoload/config.el
+ doom/reload-project has been removed (it didn't actually do anything)

The breaking change:
This update adds an "envvar file" to Doom Emacs. This file is generated
by `doom env refresh`, populated with variables scraped from your shell
environment (from both non-interactive and interactive sessions). This
file is then (inexpensively) loaded at startup, if it exists.

+ The file is manually generated with `doom env refresh`.
+ It can be regenerated automatically whenever `doom refresh` is run by
  running `doom env enable` (`doom env clear` will reverse this and
  delete the env file).
+ `doom quickstart` will ask if you want to auto-generate this envvar
  file. You won't need it if you're confident Emacs will always be
  started from the correct environment, however.
+ Your env file can be reloaded from a running Emacs session with `M-x
  doom/reload-env`. Note: this won't work if the Emacs session you're
  running it in doesn't have a correct SHELL set. i.e. don't use this to
  create your first env file!

The idea isn't mine -- it's borrowed from Spacemacs -- and was
introduced to me in #1053 by @yurimx. I was impressed with it. Prior to
this, I was unhappy with exec-path-from-shell (no hate to the dev, I
understand its necessity), and 'doom patch-macos' wasn't ideal for mac
users (needed to be reapplied every time you update Emacs). What's more,
many users (even Linux users) had to install exec-path-from-shell
anyway.

This solution suffers from none of their shortcomings. More reliable
than patch-macos, more performant and complete than
exec-path-from-shell, and easily handled by bin/doom.
2019-03-28 01:56:09 -04:00
Henrik Lissner
ab616cfb95
Merge pull request #1247 from jdnavarro/develop
Maximize window vertically/horizontally
2019-03-26 03:45:52 -04:00
Henrik Lissner
2364415140
Allow exec-path-from-shell config everywhere
In case linux users install exec-path-from-shell themselves. However, it
still won't be installed by default for anyone but Mac users.
2019-03-26 03:42:32 -04:00
Henrik Lissner
c2d0cae6a5
doom-project-find-file: avoid helm-projectile #1274
helm-projectile-find-file misbehaves as a workspace project-switch
handler (likely because it runs asynchronously and misses the lexical
value of `default-directory`), so we avoid it and use
projectile-find-file directly (which still uses helm, just not the
helm-projectile package).
2019-03-26 03:38:37 -04:00
Danny Navarro
d589f87253 Add maximize window key bindings
This includes maximization for entire buffer, vertically and
horizontally.
2019-03-24 14:47:55 +00:00
Henrik Lissner
cc20b28c26
Restore session later on restart-and-restore
So Doom has enough time to initialize before tryhing to restore the last
session.
2019-03-22 14:14:03 -04:00
Henrik Lissner
9befc015bb
Prompt to restart after doom//upgrade 2019-03-22 14:13:35 -04:00
Henrik Lissner
d7e9b47266
Fix #1278
Refactors :after-call to not fmakunbound the transient hook function, as
it may get executed multiple times before getting a chance to fully
remove itself, causing void-function errors.
2019-03-22 14:11:59 -04:00
Henrik Lissner
82ef3e987b
Remove protect-visible-buffer tests 2019-03-17 00:16:22 -04:00
Henrik Lissner
259590d54e
Remove doom|protect-visible-buffer
This behavior is now isolated to kill-this-buffer.
2019-03-16 23:59:50 -04:00
Henrik Lissner
7fd1497e88
Ask to install all-the-icons fonts in doom quickstart 2019-03-16 23:59:50 -04:00
Henrik Lissner
c9e3facb38
Revert bb3f027c
After more testing (along with 1ce2b291), projectile can, in fact, be
deferred until after startup.
2019-03-16 23:59:50 -04:00
Henrik Lissner
acf67244ca
Improve doom doctor
+ Bump Emacs version check to 25.3
+ Fix doctor reporting missing packages that are user-disabled
+ Add Doom core checks for over-sized cache files (a possible cause of
  freezes/hangs)
+ Emit a backtrace from module doctor script errors
+ Fix doom doctor not respecting DEBUG envvar
2019-03-16 23:59:50 -04:00
Henrik Lissner
689a3bb446
Remove :modules from private packages in doom/info
Unnecessary bulk.
2019-03-16 23:59:50 -04:00
Andrew Whatson
a086e6967e Fixes for doom/kill-this-buffer-in-all-windows
This was erroring when run inside a popup (eg. `M-x ielm` `C-x k`) due
to a missing check for `window-live-p`.  We don't need to do anything if
the window has already gone away.

The real vs unreal check was backwards; we should only try
`previous-buffer` if the current buffer is *not* real.
2019-03-17 00:53:17 +10:00
Henrik Lissner
93d2a2212d
Restore projectile's :after-call
If users open Emacs with a file argument, projectile will need to load
sooner.
2019-03-15 13:30:52 -04:00
Henrik Lissner
8da2785141
Remove doom-project file/dir local var support
It didn't really work, and it's too Doom-specific to be useful. We'll
need better heuristics.
2019-03-14 17:59:24 -04:00
Henrik Lissner
bb3f027ca2
Load projectile sooner in the startup process
Projectile's use is so prolific in Doom that trying to lazy load it at
startup is wasted breath.
2019-03-14 17:59:24 -04:00
Henrik Lissner
82622c2d8f
Fix package.el command substitutions
doom//autoremove and doom//install are more appropriate replacements for
package-autoremove and package-install-selected-packages, respectively.
2019-03-14 17:59:24 -04:00
Henrik Lissner
bd6233518b
Fix doom|run-switch-window-hooks
Using the wrong variable.
2019-03-13 20:15:23 -04:00
Henrik Lissner
1ce2b29193
ui/modeline: minor startup optimization
Prevents project.el from being eager-loaded at startup.
2019-03-13 18:46:06 -04:00
Henrik Lissner
a669406cad
Remove doom/what-face unit tests 2019-03-13 02:17:37 -04:00
Henrik Lissner
d868f5fd10
Use new ;;;###package cookie
This will later be used for doom/describe-packages to list all locations
where a package is being configured (along with def-package! and after!
blocks).
2019-03-13 01:55:50 -04:00
Henrik Lissner
5e5ae456bb
Replace doom/what-face with describe-char
describe-char produces the same information and much more.
2019-03-13 01:37:55 -04:00
Andrew Whatson
89e91a0291 Fix autoloading helpful for doom/describe-symbol 2019-03-13 06:44:39 +10:00
Henrik Lissner
bca814cb7c
Fix listp error when updating #1235
The async process wasn't mapping through doom-package-outdated-p, only
filtered.

Also ensure no less than two packages per thread are checked.
2019-03-12 11:50:27 -04:00
Henrik Lissner
b618025e1d
Merge pull request #1237 from flatwhatson/fix-toggle-debug
Fix doom/toggle-debug-mode
2019-03-12 11:29:51 -04:00
Henrik Lissner
ff89a5f645
Remove redundant :commands
The helpful package defines these as autoloads already.
2019-03-12 11:25:00 -04:00
Andrew Whatson
7b4afa32e4 Improvements to apropos and describe-symbol
Patch the apropos button types so they call helpful instead of the
built-in describe functions.  Also add some bindings to apropos-mode-map
so it behaves like other help modes.

Add `doom/describe-symbol` function, which shows documentation for
callable and variable symbols.  If a symbol is both a variable and a
callable, it dispatches to apropos.  This gives a better workflow than
`helpful-symbol`, which annoyingly prompts the user.

Remap `describe-symbol` to `doom/describe-symbol`, and update
`+emacs-lisp-lookup-documentation` to call it also.
2019-03-12 18:52:24 +10:00
Henrik Lissner
3f282829bf
Remove describe-symbol -> helpful-symbol remapping
helpful-symbol isn't a drop-in replacement for describe-symbol.
2019-03-11 23:50:11 -04:00
Henrik Lissner
fe28c40371
Fix void-variable frame error w/ whitespace-mode
Fixes #1242
2019-03-11 19:11:10 -04:00
Henrik Lissner
867f94e23a
Refactor doom-get-outdated-packages
May address #1235
2019-03-11 18:46:52 -04:00
Henrik Lissner
dbff052c8a
Use doom-which-key-leader-prefix-regexp
Curse your sudden but inevitable betrayal, impatience.
2019-03-11 13:16:51 -04:00
Henrik Lissner
f332ba6111
Define doom-which-key-leader-prefix-regexp 2019-03-11 13:10:42 -04:00
Henrik Lissner
dadcd29f27
Refactor leader key initialization
Ensures general-override-mode is enabled and labels are correctly
registered to all (visible) leader keys.

Relevant to #1240
2019-03-11 13:06:46 -04:00
Henrik Lissner
8392c9dcf6
Add new :ui indent-guides module
Replaces old highlight-indentation-mode with new highlight-indent-guides
plugin.
2019-03-11 12:39:38 -04:00
Andrew Whatson
f065ddfdaa Fix doom/toggle-debug-mode
Previously this would error due to undefined `doom-debug-on-error`
variable.  Now behaves like a minor-mode function to toggle both
`doom-debug-mode` and `debug-on-error`.
2019-03-10 22:56:53 +10:00
Henrik Lissner
a258995db9
Set arglist to add-hook!/remove-hook! macros
More sensible eldoc support.
2019-03-10 08:15:46 -04:00
Henrik Lissner
df26502f01
Avoid general in core
Future proofing against changes in load order.
2019-03-10 08:12:04 -04:00
Henrik Lissner
c3a9828fa3
Allow doom-package-list to scrape *all* packages
Even ones that are conditional. This does mean its plist is unevaluated,
however.
2019-03-10 08:10:59 -04:00
Henrik Lissner
b0bc1d925f
Minor refactors; revise docstrings+comments 2019-03-09 19:56:47 -05:00
Henrik Lissner
17714c2c63
Refactor Doom use-package extensions 2019-03-09 19:56:45 -05:00
Henrik Lissner
681d0f1a2a
Improve vanilla sandbox
Can now launch four different sessions:

1. Vanilla Emacs
2. Vanilla Doom (only Doom core)
3. Doom core + modules - private config
4. A full Doom session (load everything)
2019-03-09 04:53:14 -05:00
Henrik Lissner
ca9a2c8c17
Refactor interactiove bin/doom commands #1220 2019-03-09 04:28:25 -05:00
Henrik Lissner
bb9cbfecc9
Improve interactive bin/doom commands #1220
Now prints to a buffer rather than in echo-area. Still experimental
however.
2019-03-09 03:53:38 -05:00
Henrik Lissner
419c3ba1e6
feature/evil: recenter window after / * or # 2019-03-09 03:42:55 -05:00
Henrik Lissner
54d1c0dd56
Minor, general refactors 2019-03-09 03:42:55 -05:00
Henrik Lissner
8e866bb37f
Improve leader key initialization
And ensure leader key always has precedence.

Indirectly fixes #1234
2019-03-09 02:42:23 -05:00
Henrik Lissner
e0ed8669af
Move (if|when)-let* shims to core.el
Fix void-functon when-let* errors at startup for Emacs 25.* users.
2019-03-08 18:06:35 -05:00
Henrik Lissner
c9e7d27317
Set leader keys later #1233
Setting them too soon means the user can't change them.
2019-03-08 14:23:42 -05:00
Henrik Lissner
5ab58a7eaf
Load subr-x & cl-lib sooner 2019-03-08 06:13:07 -05:00
Henrik Lissner
cec2b4e9bc
Add doom/toggle-debug-mode command 2019-03-08 04:25:45 -05:00
Henrik Lissner
748b197676
Minor, general refactors 2019-03-08 04:25:45 -05:00
Henrik Lissner
a443d9ab07
Refactor doom-initialize-packages & package API
- Packages are initialized once, when package.el is first loaded, and
  must be updated manually via doom/reload-packages.
- Package->module association is now stored in the package's PLIST under
  :modules. This is an internal property and cannot be explicitly set
  through `package!'
- Add doom-package-list function
- Rename doom-get-packages to doom-find-packages
- Updated doom-find-packages' docstring
- Added the :core filter to doom-find-packages
- Simplified doom-initialize-packages
- doom/reload calls doom/reload-packages if necessary.
- Fix redundant properties in doom-packages
- Remove tracking of after!, def-package! and def-package-hook! blocks.
  Replaced with doom-package-list being able to see all packages, even
  in disabled modules.
- Add :built-in property to package! for dummy packages. This is
  important so that doom/describe-package can see built-in packages.
2019-03-08 04:25:44 -05:00
Henrik Lissner
4055f667fb
Defer doom|disable-whitespace-mode-in-childframes 2019-03-08 02:37:34 -05:00
Henrik Lissner
8e32f0da18
Rethink theme/font initialization order
+ Don't use set-frame-font. Causes issues for daemon users and is
  slower.
+ Revice init function docstrings
+ Load fonts a little earlier than themes

May resolve an issue where fonts in daemon Emacs are too small on
startup.

Addresses #1223
2019-03-08 02:37:33 -05:00
Henrik Lissner
917d89da87
Refactor module init hooks
Also adds doom-after-init-modules-hook for consistency, which is an
alias to after-init-hook until I decide if it's necessary for it to be
independent.
2019-03-08 02:37:33 -05:00
Henrik Lissner
a4c0bc2738
Optimize general integration
Using general to bind leader keys was responsible for 40-50% of Doom's
startup time. This change reduces that significantly, but not entirely.
It may be better that the config/default module not use map!. It is a
convenient macro, but general is a huge bottleneck.
2019-03-08 02:37:33 -05:00
Henrik Lissner
44de995ca5
config/default: change SPC h keymaps
SPC h now maps to help-map to reduce redundancy. Some adjustments and
additions were made to this map so all users (evil and vanilla) can
benefit from Doom's extra help commands.
2019-03-08 02:37:33 -05:00
Henrik Lissner
a05b1877be
Rewrite switch-{buffer,window} hooks
+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
  doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
  in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
  times it gets triggered.
2019-03-08 02:37:33 -05:00
Henrik Lissner
8f2fb07948
Add advice-add! & advice-remove! helpers 2019-03-08 02:37:33 -05:00
Henrik Lissner
9b180fda97
Refactor doom-initialize & bootstrap in core.el 2019-03-08 02:37:32 -05:00
Henrik Lissner
8c701ef7d4
Fix void-variable error from ediff config 2019-03-08 02:34:26 -05:00
Henrik Lissner
31688c921d
Refactor doom-get-outdated-packages
Partitions quelpa packages so there are 4 threads tops.
2019-03-08 02:34:26 -05:00
Henrik Lissner
2d353b849c
Change file-exists-p! to return file if it exists 2019-03-08 02:34:26 -05:00
Henrik Lissner
d94aa9b57c
Add xclip.el for tty clipboard support
Needs more testing
2019-03-08 02:34:26 -05:00
Henrik Lissner
4fbf7a2687
Remove expand-region package
It was unused, and is redundant with evil's text object expansion keys.
2019-03-08 02:34:26 -05:00
Henrik Lissner
884957bdc6
Refactor format! macro
By removing the cl-flet call, we reduce the size of backtraces produced
during bin/doom commands by a whopping 80%. Noice.

Also renames doom-ansi-apply -> doom-color-apply
2019-03-07 18:26:44 -05:00
Henrik Lissner
e497df4a28
Restore obsolete doom-(post-)?init hooks
These will be removed later.
2019-03-05 19:23:50 -05:00
Henrik Lissner
024e27b618
Add contingency plan for local-vars hooks
They don't run if enable-local-variables is set to nil.
2019-03-05 17:08:39 -05:00
Henrik Lissner
1ec9f5b2e9
Move hl-line-range-function fix to ui/doom
Remapping the hl-line face is what causes the bug that this fix
addresses.
2019-03-05 03:01:59 -05:00
Henrik Lissner
c1beb39c5b
Rename doom/describe-setters -> doom/describe-autodefs 2019-03-05 01:55:40 -05:00
Henrik Lissner
cfa97470fc
Add links to config files in describe-packages
Also dims packages that aren't installed.
2019-03-05 01:55:40 -05:00
Henrik Lissner
cf5a398e0d
doom-log: include doom-debug-mode test in result
Relevant to #1215
2019-03-05 00:19:51 -05:00
Henrik Lissner
6a4682f3f1
Change doom/describe-module to browse module
Instead of opening its README.org, which may or may not exist.
2019-03-05 00:04:30 -05:00
Henrik Lissner
fbcb4e6973
Minor refactor across the board 2019-03-04 20:47:26 -05:00
Henrik Lissner
f18e1c0ea1
Refactor switch {buffer,window} hooks 2019-03-04 20:47:26 -05:00
Henrik Lissner
05303c0fdb
💥 Rethink core hook order & naming
- doom-post-init-hook was renamed doom-init-modules-hook
- doom-init-hook was renamed doom-before-init-modules-hook
- doom-init-modules-hook now runs before the user's config.el is run
- Moved doom-init-ui-hook to run later (on window-setup-hook rather than
  emacs-startup-hook).

Yield a modest improvement in startup times.
2019-03-04 20:47:26 -05:00
Henrik Lissner
b054190820
New doom/describe-packages command
Replaces describe-packages and adds Doom module awareness to package
documentation.
2019-03-04 20:47:25 -05:00
Henrik Lissner
f6cc2644b0
New doom-log macro for debug-time logging
doom-log won't interfere with the minibuffer if it's in use, and will
report the originating module.

Addresses #1215
2019-03-04 18:38:25 -05:00
Henrik Lissner
b98f34d1fd
Add :killb & doom/kill-buried-buffers
Also fix reported killed-buffer count when invoking kill commands
interactively.
2019-03-04 14:07:34 -05:00
Henrik Lissner
f0ad9b7585
Ensure explicitly installed pkgs are user-selected 2019-03-04 04:57:07 -05:00
Henrik Lissner
66d23e39bb
Fix doom/move-this-file not opening renamed file 2019-03-03 02:17:42 -05:00
Henrik Lissner
78b4c784a6
Remap describe-symbol -> helpful-symbol 2019-03-03 01:26:30 -05:00
Henrik Lissner
1eb1933518
Don't let packages modify command-switch-alist
From their autoloads.
2019-03-02 03:55:15 -05:00
Henrik Lissner
3ea805cc94
Minor experimental startup optimizations
Definitely premature optimization.
2019-03-02 03:54:04 -05:00
Henrik Lissner
84343f57aa
Refactor UTF-8 setters
Some were redundant
2019-03-02 03:53:13 -05:00
Henrik Lissner
80607ff033
Confirm quit on doom/restart-and-restore 2019-03-02 03:06:29 -05:00
Henrik Lissner
d46bb287ae
General refactor of Doom core
- Code reduction and refactor across the board (cull unneeded minor
  advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
  augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
2019-03-02 01:34:19 -05:00
Henrik Lissner
687496167a
Fix void-function projectile-relevant-known-projects
Thrown when using doom/find-file-in-other-project and
doom/browse-in-other-project too soon.
2019-03-02 01:34:19 -05:00
Henrik Lissner
8a90f29c91
Make session persistence module agnostic
They've been removed from feature/workspaces and moved into
core/autoload/sessions, which falls back to desktop.el if persp-mode
isn't present. This also offers a substantial speed up to
restart+restoring and restoring sessions in general.

Also fixes #1210, where the newly spawned frame after doom/restart
wasn't focused.

Introduces the following commands:

- doom/restart
- doom/restart-and-restore
- doom/quickload-session
- doom/quicksave-session
- doom/load-session
- doom/save-session
- +workspace/restore-last-session (alias for doom/quickload-session)

And removes

- +workspace/load-session
- +workspace/save-session
- +workspace/load-last-session (renamed to +workspace/restore-last-session)
- +workspace/restart-emacs-then-restore (replaced by doom/restart-and-restore)
- :ss (ex command)
- :sl (ex command)
2019-03-02 01:34:19 -05:00
Henrik Lissner
21e01189b9
Properly keep cursor out of minibuffer prompt
The prompt in the minibuffer is read-only. You are able to move the
cursor into it before this fix.

This also more effectively silences echo-area output when deleting text
in the minibuffer. No more "Text is read-only" blocking what you're
typing.
2019-03-02 01:34:14 -05:00
Henrik Lissner
8903eebdc4
Change purpose of autodef cookie argument
;;;###autodef FORM

FORM was used as a predicate for inclusion as an autodef. Now it is used
as the replacement sexp in case the module is disabled.

Oh, you don't know what autdefs are? Well let me explain (thanks for
asking, by the way). An autdef'ed function, macro, or function alias is
always available to be called, anywhere in Doom, even if its containing
module is disabled. For instance:

  ;;;###autodef
  (defun say-hello! (name)  ; the trailing ! denotes an autodef
    (message "Hello %s" name))

This makes it safe to call `do-something` without a check whether it
exists (or if its module is enabled). When the module is enabled, an
autoload entry is added to the Doom autoloads file:

  (autoload 'do-something "path/to/some/modules/autoloads")

And it is autoloaded as normal when it is first used. However, if the
module is disabled, then this is inserted instead:

  (defmacro do-something (&rest _))

This no-ops; it does nothing and doesn't evaluate its arguments. If FORM
above was provided, that is used instead of a noop macro.

It's a little smarter than simple substitution, but that's the gist of
it.
2019-03-02 01:34:14 -05:00
Henrik Lissner
8832737671
Adopt seagle0128/doom-modeline for :ui modeline
And remove obsolete :ui doom-modeline module.

Relevant to: #136, #921
2019-03-02 01:34:14 -05:00
Henrik Lissner
fbce94cd20
Remove select-enable-{clipboard,primary} #1008
select-enable-clipboard is already `t` by default and
select-enable-primary disturbs non-evil yanking behavior.
2019-02-28 03:21:40 -05:00
Henrik Lissner
9b7d95f43a
Remove doom-cleanup-hook & doom/cleanup-session
These weren't reliable, often times buggy or overzealous about killing
buffers and processes. Best to do it manually or come up with a better
solution.
2019-02-26 22:57:02 -05:00
Henrik Lissner
4c35618044
Improve version check for line-numbers polyfill
Since there are early versions of Emacs [26.0, 26.1) that don't have the
new line numbers library.
2019-02-26 17:29:40 -05:00
Henrik Lissner
1b43ea50f0
Revise SPC f keybinds
- SPC f . -> counsel-file-jump or find-file
- SPC f > -> doom/browse-in-other-projects
- SPC f / -> projectile-find-file
- SPC f ? -> doom/find-file-in-other-project
- Moved doom/sudo-find-file to SPC f S

This change was made to accommodate the new
doom/browse-in-other-projects and doom/find-file-in-other-project
commands, which make it easy to jump to files in other known projects.
2019-02-26 13:21:16 -05:00
Henrik Lissner
15dd5870ea
Fix uniquify+persp-mode compatibility
Uniquify would rename buffers across workspaces, causing "sticky"
buffers when switch between workspaces with buffers that have the same
base name.
2019-02-26 12:19:35 -05:00
Henrik Lissner
fed0a51f9e
Fix ns-auto-titlebar not correctly being activated
Makes +doom|determine-ns-appearance redundant.
2019-02-25 00:26:31 -05:00
Henrik Lissner
4ccbc9c7df
Update major-mode=>module alist for help commands 2019-02-24 21:00:19 -05:00
Henrik Lissner
6fd34cd10f
Revise documentation for defer-feature! macro 2019-02-24 20:59:29 -05:00
Henrik Lissner
1758266ce4
Fix doom/describe-setters 2019-02-24 20:40:16 -05:00
Henrik Lissner
7c5eefee3e
General, minor refactoring 2019-02-24 13:58:56 -05:00
Henrik Lissner
4aaeeb509c
Auto-determine ns-appearance parameter on MacOS
This is experimental. It will adapt the frame titlebar's theme depending
on the background of the loaded theme.
2019-02-24 13:57:01 -05:00
Henrik Lissner
51129567d9
Mention $DOOMDIR/init.el in leader key docstrings
They need to be changed as soon as possible, otherwise leader keybinds
done before the change will use the old leader key.
2019-02-24 13:47:54 -05:00
Henrik Lissner
e3f338b934
Fix package file-missing errors at compile-time 2019-02-24 13:47:53 -05:00
Henrik Lissner
acddf6a047
Move delete-backward-char & newline-and-indent advice
To config/default; the only place it is used.
2019-02-22 00:25:30 -05:00
Henrik Lissner
69ed1a4a99
feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -05:00
Henrik Lissner
afae6e4f1d
Remove doom/toggle-comment-region-or-line
Replaced with simpler keybinds.
2019-02-21 19:13:36 -05:00
Henrik Lissner
11d7ae070a
Add async-byte-compile-log-file setting to core.el 2019-02-21 19:13:35 -05:00
Henrik Lissner
6f32ac371b
Highlight non-standard whitespace in file buffers
Prevents whitespace-mode from being enabled in special buffers (like
circe).
2019-02-20 01:28:19 -05:00
Henrik Lissner
c82faf7f10
General reformatting & minor refactors 2019-02-19 15:53:26 -05:00
Henrik Lissner
cee851f55b
Only activate whitespace-mode in editable buffers
Otherwise whitespace-mode will disrupt fontification in special buffers,
like helm and elfeed buffers.

Indirectly addresses #1179
2019-02-18 15:39:08 -05:00
Henrik Lissner
4437d80133
Add dos2unix & unix2dos conversion commands 2019-02-18 01:59:56 -05:00
Henrik Lissner
ec55884aae
General, minor reformatting & refactor 2019-02-18 00:47:46 -05:00
Henrik Lissner
7d0caf3efd
New editor/fold module
Extracted from feature/evil and emacs/hideshow.
2019-02-18 00:47:46 -05:00
Henrik Lissner
e0519098d9
(Almost) always highlight non-default indentation
The purpose of this is to highlight indentation characters that betray
your indent-tabs-mode setting. i.e. If you're using tab indentation,
highlight space indentation. If you're using spaces, highlight tab
characters.
2019-02-17 22:12:52 -05:00
Henrik Lissner
3dcd253f71
Remove emacs/ediff & move to core-ui 2019-02-17 21:54:26 -05:00
Henrik Lissner
e6debe55f1
Switch to main repo for all-the-icons
The font-lock-fix branch was merged.
2019-02-17 14:44:23 -05:00
Henrik Lissner
9558b5e793
copy-seq -> copy-sequence
It's a possibility that the copy-seq alias doesn't exist in certain
builds of Emacs. Better safe than sorry.
2019-02-15 20:03:57 -05:00
Sean Farley
11b4a3502a bindings: add common comment toggle
This is fairly common in most editors so let's make lives easier.
2019-01-28 23:14:14 -08:00
Luigy Leon
a3694edb15 Fix doom/update-package 2019-01-24 02:13:16 -05:00
Henrik Lissner
f264a9bc6e
Back to command = super, option = meta on MacOS
On MacOS, command used to be 'meta, which Emacs (and many packages) use
for many keybinds. I don't want to pollute the command key, so it is now
meta (as is the Emacs default).

The MacOS keybind fixes have been moved back to super.
2019-01-22 19:29:13 -05:00
Henrik Lissner
b6718715fe
Fix doom-big-font-mode when no frame exists
It must still be appended to emacs-startup-hook. If it's run any
earlier, doom|init-fonts will overwrite it.

Reported by @ar1a.
2019-01-21 22:19:14 -05:00
Henrik Lissner
efa577dec2
Improve error-handling in doom/update-package 2019-01-21 17:39:42 -05:00
Henrik Lissner
a5f53098e3
Merge pull request #1106 from y-usuzumi/develop
Fix an issue where doom-leader-alt-key and doom-localleader-alt-key does not work in emacs mode
2019-01-20 14:15:55 -05:00
Aria Edmonds
81e8fafa18 Improve projectile-git-command
When indexing it ignores hidden files, which is especially annoying for
dotfiles where everything starts with a dot. If you just have -H it'll
index .git too though, so we exclude that
2019-01-18 19:40:09 +11:00
Henrik Lissner
aaee04e257
Remove unused doom-leader prefix command 2019-01-14 21:24:52 -05:00
Henrik Lissner
d80802d3c9
doom/cleanup-session: don't kill processes by default 2019-01-14 00:52:31 -05:00
Henrik Lissner
31a0ad5b95
Move doom--condition-case! to core/cli/packages
The only place it is being used
2019-01-10 15:44:42 -05:00
Kenneth Zhao
0a7717786c Fix an issue where doom-leader-alt-key and doom-localleader-alt-key does not work in emacs mode 2019-01-10 11:45:32 +08:00
Henrik Lissner
069c196330
Appease byte-compiler senpai
Please notice me
2019-01-08 20:54:03 -05:00
Henrik Lissner
25b9a90c12
Fix localleader keys in replace state #1097 2019-01-07 04:57:54 -05:00
Henrik Lissner
b56639e31b
Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
Henrik Lissner
19987df00a
Add IS-BSD constant
Fixes dired gls support on BSD OSes (and not just MacOS).
2019-01-05 16:06:26 -05:00
Henrik Lissner
232cb190cc
Mention alternative in docs for bin/doom upgrade 2019-01-05 15:33:06 -05:00
Henrik Lissner
4617e00b91
Autoload sp-point-in-{comment,string}
Some commands (like doom/forward-to-last-non-comment-or-eol) can use
this before smartparens has loaded.
2019-01-05 15:21:27 -05:00
Henrik Lissner
a4cd5fafd8
Don't unbind keys when passed a label to :prefix
Fixes an issue where

  (map! :leader
        :prefix ("f" . "asdasdas")
        ...)

Would unbind SPC f before adding your new keybinds.
2019-01-03 02:26:11 -05:00
Henrik Lissner
5e3d4c3ba2
Update map! tests for removal of :if 2019-01-02 16:06:39 -05:00
Henrik Lissner
3923760c7c
Adjust compile-time state in package helper macros 2019-01-02 14:11:02 -05:00
Henrik Lissner
78ebec77ce
Update packages after bin/doom upgrade 2019-01-02 13:56:13 -05:00
Henrik Lissner
d3882f539c
Remove :if from map!
It doesn't work as expected and would require too much work to support.
2019-01-02 13:18:19 -05:00
Henrik Lissner
9628a74718
Fix disable-packages! macro
Now rolls out package! calls, rather than adjusting state directly.
2019-01-02 13:17:26 -05:00
Henrik Lissner
81394cf733
Only prefer compiled theme on startup
...But not on doom/reload-theme or post-init load-theme calls.
2018-12-31 15:19:23 -05:00
Henrik Lissner
6d10b9bbdf
Revert to Meta, instead of Super
Using meta is a little more flexible. Since there is no dedicated meta
key on our keyboards (anymore), it can be remapped to another modifier
by changing mac-command-modifier, x-meta-keysym, etc. without
sacrificing super or alt keybinds.
2018-12-31 15:00:05 -05:00
Henrik Lissner
e373052064
Restrict support to Emacs 25.3+ from now on
25.1-25.2 are no longer supported.
2018-12-28 15:22:52 -05:00
Henrik Lissner
afee81dfde
Fix define-leader-key! comment 2018-12-28 15:22:29 -05:00
Henrik Lissner
f2d48a1764
Merge pull request #1066 from andresilva/fix-highlight-non-default-indentation
Fix highlight-non-default-indentation
2018-12-27 02:00:46 -05:00
Henrik Lissner
63a224f0e8
Fix wrong which-key labels & leader key precedence
This changes how leader keys are bound, to fix an issue where the wrong
which-key label was assigned to the wrong keys, and cases where the
leader key was being shadowed by other minor mode mappings.

Unfortunately, this new method adds 10-20% to startup times. I'll
address this in a future patch. For now, correctness is more important.

Also fixes dashboard keybind detection.
2018-12-27 00:08:47 -05:00
André Silva
cf5d7e3ba8 fix highlight-non-default-indentation 2018-12-26 11:54:18 +00:00
Henrik Lissner
b7cfa90967
Update map! docstring
And remove all references to :alt-prefix
2018-12-26 00:55:39 -05:00
Henrik Lissner
c0c84eb99b
Fix M-SPC error with helm #1059
The global leader keybind was conflicting with a global M-SPC keybind in
helm-map. This keybind should only be set in non-evil sessions, so we
unset it if evil is found.
2018-12-25 03:56:24 -05:00
Henrik Lissner
d337e255d3
Fix :leader/:localleader and :prefix
Due to issues with preset prefixes in general definers and nested
:prefix's supplied from a map! call not cooperating, many localleader
keybinds were broken and causing errors. For :leader/:localleader keys,
we now use :infix for sub-prefixes.

However, with this change, the :alt-prefix property has been removed, as
there is no simple way to support this without some major state
gymnastics in map!.

Fixes #1059
2018-12-25 02:29:29 -05:00
Henrik Lissner
3f195614d9
Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
Henrik Lissner
9936532ea3
Move auth-sources & mc/list-files
...to move appropriate locations.
2018-12-23 23:16:03 -05:00
Henrik Lissner
5ad0b749a1
Refactor map! & tests
This resolves issues with :leader/:localleader keys not working when
evil states are specified. Evil states are now ignored. Also, some of
map!'s internals have been optimized to yield a ~10% improvement in
macro expansion time.
2018-12-23 23:12:10 -05:00
Henrik Lissner
451c16b8ee
Revise :after-call & :defer-incrementally comments
Now implicitly adds the current package to :defer-incrementally's list
of packages.
2018-12-23 00:25:51 -05:00
Henrik Lissner
0efa915164
Fix :leader/:localleader targeting preceding keys
This fixes an issue where even the keys preceding :leader/:localleader
were registered as leader/localleader keys.
2018-12-23 00:10:18 -05:00
Henrik Lissner
91474c98ee
Fix localleader binds hijacking SPC in insert mode 2018-12-22 19:33:20 -05:00
Henrik Lissner
5447927e6a
Refactor map! tests 2018-12-22 19:30:00 -05:00
Henrik Lissner
4383531b32
Ensure gerneral-implicit-kbd=t in map!
Also updates map! tests (TODO: abstract all those cdr-caddr's!)
2018-12-22 17:11:20 -05:00
Henrik Lissner
a29163740d
GIT_ASKPASS=git-gui--askpass for GUI Emacs+Windows 2018-12-22 17:00:06 -05:00
Henrik Lissner
604a41527f
Use general custom definers rather than :definer
The former approach was the cause for a huge increase in startup
time (adding ~0.4s) when :leader and :localleader were used. This is
because general-define-key was called for every key-def pair.

This new approach batches these calls, which has decreased the
performance impact by at least 80%.
2018-12-22 16:50:01 -05:00
Henrik Lissner
a124497f4e
find-file-visit-truename = t 2018-12-22 14:30:29 -05:00
Henrik Lissner
4d3587c8d0
Fix void-variable list error in multi-state binds
Caused by overzealous re-setting of a variable in a loop, when it should
only be set once.
2018-12-22 05:20:43 -05:00
Henrik Lissner
d6cb0ec5f5
General cleanup & minor refactoring 2018-12-22 04:25:15 -05:00
Henrik Lissner
3dd34abe61
Remove hide-undefined-binds advice for which-key
Before general.el was introduced to Doom, commands were bound to keys
whether or not their containing modules were enabled. This was out of
laziness and readability. I intend to change this, as such it is no
longer necessary to hide unavailable keybinds from which-key.
2018-12-22 04:25:15 -05:00
Henrik Lissner
674ad9837d
Update after! docstring 2018-12-22 04:25:15 -05:00
Henrik Lissner
4daa9271a0
Introduce general.el & rewrite map!
+ Now uses an overriding keymap for leader keys, so that it is always
  available, even outside of normal/visual states. In insert/emacs
  states, or in sessions where evil is absent, an alternative prefix is
  used for leader/localleader keys. See these variables:
  + doom-leader-prefix
  + doom-leader-alt-prefix
  + doom-localleader-prefix
  + doom-localleader-alt-prefix
+ Keybinds now support alternative prefixes through the new :alt-prefix
  property. This is useful for non-evil users and non-normal evil
  states. By default, this is M-SPC (leader) and M-SPC m (localleader).
+ Removed +evil-commands flag from config/default (moved to
  feature/evil/+commands.el).
+ config/default/+bindings.el has been split into
  config/default/+{evil,emacs}-bindings.el, which one is loaded depends
  on whether evil is present or not. The latter is blank, but will soon
  be populated with a keybinding scheme for non-evil users (perhaps
  inspired by #641).
+ The define-key! macro has been replaced; it is now an alias for
  general-def.
+ Added unmap! as an alias for general-unbind.
+ The following modifier key conventions are now enforced for
  consistency, across all OSes:
    alt/option      = meta
    windows/command = super
  It used to be
    alt/option      = alt
    windows/command = meta
  Many of the default keybinds have been updated to reflect this switch,
  but it is likely to affect personal meta/super keybinds!

The map! macro has also been rewritten to use general-define-key. Here
is what has been changed:

+ map! no longer works with characters, e.g. (map! ?x #'do-something) is
  no longer supported. Keys must be kbd-able strings like "C-c x" or
  vectors like [?C-c ?x].
+ The :map and :map* properties are now the same thing. If specified
  keymaps aren't defined when binding keys, it is automatically
  deferred.
+ The way you bind local keybinds has changed:

    ;; Don't do this
    (map! :l "a" #'func-a
          :l "b" #'func-b)
    ;; Do this
    (map! :map 'local "a" #'func-a
                      "b" #'func-b)

+ map! now supports the following new blocks:
  + (:if COND THEN-FORM ELSE-FORM...)
  + (:alt-prefix PREFIX KEYS...) -- this prefix will be used for
    non-normal evil states. Equivalent to :non-normal-prefix in general.
+ The way you declare a which-key label for a prefix key has changed:

    ;; before
    (map! :desc "label" :prefix "a" ...)
    ;; now
    (map! :prefix ("a" . "label") ...)

+ It used to be that map! supported binding a key to a key sequence,
  like so:

    (map! "a" [?x])  ; pressing a is like pressing x

  This functionality was removed *temporarily* while I figure out the
  implementation.

Addresses: #448, #814, #860
Mentioned in: #940
2018-12-22 04:14:43 -05:00
Henrik Lissner
5e7a2d8703
Merge pull request #1038 from ztlevi/ranger
Adding Ranger module to doom
2018-12-13 15:04:37 -05:00
Henrik Lissner
f4698d2f0a
Fix uncaught errors during incremental load 2018-12-10 13:50:58 -05:00
Ting Zhou
eedbbdd9c1 emacs/dired: use all-the-icons font lock fix recipe 2018-12-08 21:52:24 -08:00
Henrik Lissner
c56f802b4b
Update (if|when)-let* alias comments 2018-12-06 17:45:53 -05:00
Henrik Lissner
b5552eed39
Improve predicate fn for byte-compile targets
Will now avoid dotfiles and unit test files.
2018-12-06 17:45:53 -05:00
Henrik Lissner
33f2d5d321 Upload load-order in doom!'s docstring 2018-12-05 22:11:54 -05:00
Henrik Lissner
7b761a9b42 Refactor feature deferral for (common|emacs)-lisp
'lisp-mode is now deferred, to make it easier to lazy-configure it
2018-12-05 22:11:54 -05:00
Henrik Lissner
f003d2b4fe
Merge pull request #1032 from mfiano/develop
Various changes
2018-12-05 18:59:42 -05:00
Aria
fe8b17d6da move projectile fd out of magit.el
lol
2018-12-04 20:09:44 +11:00
Michael Fiano
9c96a2bab7 Fix: Prevent projectile from deleting important buffers 2018-12-02 02:02:56 -05:00
Henrik Lissner
f43e64e505
Add ns-auto-titlebar package for MacOS
This fixes mismatching frame title and frame coloring, as well as
auto-sets the ns-appearance parameter depending on your theme.
2018-10-25 13:42:20 -04:00
Henrik Lissner
847983e278
Fix bin/doom hanging after generating autoloads
Emacs occasionally hangs when polling for the emacs server (with
server-running-p). Since this is used for such a trivial feature (to
decide whether or not to display the "you need to restart" message), I
removed it. Now it always shows that message (if the autoload files have
changed).
2018-10-19 12:07:17 -04:00
Henrik Lissner
56d7f70b2f
Make all-the-icons return empty string in tty #941 2018-10-16 23:50:46 -04:00
Henrik Lissner
63e25b349d
Silence undo-tree a little less destructively
undo-tree-load-history was formerly advised with doom*shut-up, which
uses the quiet! macro to suppress output. quiet! accomplishes this by
temporarily redefining message to a no-op function. However, if a fatal
error occurs while this binding is active, in some cases, message will
remain redefined, perpetually silencing all output to the minibuffer.

This tries to mitigate that, at least where undo-tree is concerned.

Also sharp-quotes an unquoted function.
2018-10-16 02:51:11 -04:00
Henrik Lissner
e9608ab939
doom-project-find-file: unset projectile-project-root
Instead of setting it default-directory, which can cause symlink
resolution issues.
2018-10-14 23:59:26 -04:00
Henrik Lissner
0ebf526e01
Fix doom/info omitting first module in each category
Discovered in #941
2018-10-12 14:07:25 -04:00
Henrik Lissner
d21887149f
Minor refactor/reformatting 2018-10-06 20:44:25 -04:00
Henrik Lissner
9a17c909c9
Don't always create dummy files on doom quickstart
Only when DOOMDIR doesn't exist.
2018-10-06 20:44:25 -04:00
Henrik Lissner
5d3bada86e
Don't byte-compile xdg-path in doom-private-dir
The danger of a stale value post-byte-compilation far outweighs the
benefits.
2018-10-06 20:44:25 -04:00
Edwin Török
cd314a1188 fix setq-hook error path
In setq-hook!:
core-lib.el:280:41:Warning: ‘listp’ called with 2 args, but requires 1

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-04 00:38:05 +01:00
Edwin Török
7795da4800 Fix doom-serif-font and doom-variable-pitch-font: they need to be set for current frame too
On Emacs 26.1 these two font settings had no effect on the main frame.

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-03 23:03:11 +01:00
Henrik Lissner
5b4690419b
Increase doom-large-file-size threshold to 2mb
1mb is a little *too* conservative.
2018-10-03 15:10:08 -04:00
Henrik Lissner
48f7d33c03
Don't doom|check-large-file on tags files
Fixes an issue where reading TAGS files could cause "%s is a large file,
open literally to avoid performance issues?" prompts every time you open
a project file, if the tags file was larger than `doom-large-file-size'
2018-10-03 15:08:25 -04:00
Henrik Lissner
fe425c005e
Add g-/g= keys for buffer narrowing/widening 2018-10-03 11:14:08 -04:00
Henrik Lissner
6368ef9ba0
Add docstrings to fix hooks 2018-10-01 20:29:43 -04:00
Henrik Lissner
e85aaabed9
Rewrite bin/doom quickstart
Now creates a packages.el file as well, with some commented examples,
and includes comment headers for config.el and packages.el.
2018-09-30 22:49:23 -04:00
Henrik Lissner
fd19698927
doom|hack-local-variables => MODE-local-vars-hook
Uses a less destructive method (the same that Spacemacs uses) than the
one introduced in 13cee68, by introducing MODE-local-vars-hook hooks,
which run after local vars have been initialized.

The old method was to call `hack-local-variables` *before* mode hooks
run, however, this causes variables set by modes to have higher
precedence than local vars, which is unacceptable.

Also moved intero-mode & dante-mode to haskell-mode-local-vars-hook
2018-09-29 15:01:35 -04:00
Henrik Lissner
e7fc1d3290
Fix wrong-type-arg: stringp, nocache errors
Fix old usage of doom-project-name and doom-project-root.
2018-09-28 23:49:18 -04:00
Henrik Lissner
cae5009925
cl-remove-if -> cl-delete-if
Minor optimization for doom-load-packages-incrementally (cl-delete-if
deletes in-place).
2018-09-28 22:50:39 -04:00
Henrik Lissner
f994fb07bf
bin/doom: make invalid command a user-error
It shouldn't invoke error handlers.
2018-09-28 22:29:42 -04:00
Henrik Lissner
2908112dc4
Update doom-project-root test 2018-09-28 21:25:32 -04:00
Henrik Lissner
13cee6870e hack-local-variables before mode hooks
The default behavior is to read file+directory-local variables after the
major mode and its hooks have run. I think this is backwards. What if we
want to use these local variables to customize the things running in
hooks?

This does mean hack-local-variables will run at least twice when the
mode changes, but this is an acceptable compromise.
2018-09-28 21:13:28 -04:00
Henrik Lissner
05d759fa8b doom/window-{enlargen,zoom}: assoc -> assq
A minor optimization. assq is significantly faster than assoc (not that
it matters for this incredibly insignificant use-case, but yay for
premature optimization!)
2018-09-28 21:13:28 -04:00
Henrik Lissner
461fc8e312 Refactor doom-big-font-mode
Complain if doom-font or doom-big-font aren't set.
2018-09-28 21:13:27 -04:00
Henrik Lissner
6da307d30e Refactor font initialization
+ Add doom-serif-font variable
+ Update docstrings of all doom-*font variables to mention that they all
  support font-specs, font objects, XFT strings and XLFD strings.
+ Set doom-font if the user hasn't, ensuring that other functions know
  what the current, default font is set to (fixes doom-big-font-mode not
  switching back to normal when disabled).
2018-09-28 21:13:27 -04:00
Henrik Lissner
1785adb068 projectile-require-project-root = t
Now that projectile-project-root has changed not throw errors (depending
on projectile-require-project-root), it is safe to change this, in case
you use other projectile commands that do require a project.
2018-09-28 21:13:27 -04:00
Henrik Lissner
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
Henrik Lissner
3961ba1662 Fix command-log-mode not disabling on toggle
clm/toggle-command-log-buffer enables global-command-log-mode, but
doesn't disable it on second invocation, so we use
global-command-log-mode instead.
2018-09-28 21:13:27 -04:00
Henrik Lissner
ddaf1e5b67 Fix wrong-type-arg error on menu-bar-open
Due to malformed menu-bar-lines frame property. Same for tool-bar-lines
as well.
2018-09-28 21:13:27 -04:00
Henrik Lissner
15991b5639 Refactor quiet! to be less destructive
It's possible for the debugger to be invoked from inside code wrapped in
a (quiet! ...) call. The debugger pauses Emacs in a broken state where
the functions locally rebound by quiet! (e.g. message, load-file,
write-region, etc) are never returned to their original definitions.

This attempts to reduce that probabilityby changing how quiet! silences
code. Rather than silencing them completely, they will be logged
to *Messages* but not displayed in the echo area.

Also, quiet! is now used less, where it isn't strictly needed (or where
inhibit-message is sufficient).
2018-09-28 21:13:27 -04:00
Henrik Lissner
8a8b5c6089 Refactor bin/doom & doom-dispatch
Done to make bin/doom produce better debugger output (and more readily).
A lot of bin/doom errors aren't recurring, so it's better to produce the
full error report ASAP.
2018-09-28 21:13:27 -04:00
Henrik Lissner
4ea4754162 Add commands for using bin/doom from inside Emacs
This is experimental. I'd eventually like users to be able to management
Doom from inside Emacs, if they desire. This may be the only way to have
a decent user experience on Windows, for that matter.

Also adds a popup rule for it.
2018-09-28 21:13:27 -04:00
Henrik Lissner
078e3028a6 Minor, general comment revision 2018-09-28 21:02:59 -04:00
Henrik Lissner
4bdd6002a4
Restore projectile-project-root's old behavior
For now...
2018-09-27 21:55:19 -04:00
Henrik Lissner
9afc61e57e
Refactor & optimize doom! + module API 2018-09-25 23:52:20 -04:00
Henrik Lissner
aa930256b8
Update doom/reload-project for changes upstream
In projectile.
2018-09-25 23:36:54 -04:00
Henrik Lissner
377dbae3fc
Install/compile packages in order of declaration
This should fix an issue where a package A, which uses macros from a
package B, is installed before package B, causing void-function errors.

The currently known and affected packages are neotree, parinfer, and
evil-collection.
2018-09-25 11:00:30 -04:00
Henrik Lissner
cffb1d367f Update without-project-cache! macro
To match upstream changes in projectile
2018-09-22 13:15:12 -04:00
Henrik Lissner
ac63596be8 Fix doom-project-root returning nil if no project
It should return default-directory. A change upstream broke this.
2018-09-22 13:15:12 -04:00
Henrik Lissner
75ad188e01
Fix :defer-incrementally t
Should be the same as :defer-incrementally (<package-name>)
2018-09-21 22:43:52 -04:00
Henrik Lissner
a65868ba89
Fix "end of buffer" errors on backspace 2018-09-21 00:52:53 -04:00
Henrik Lissner
9245e030bb
Fix doom/reload-font for XFT fonts 2018-09-20 22:22:14 -04:00
Henrik Lissner
e38b710f29 Update docstrings for theme & font variables 2018-09-20 14:31:47 -04:00
Henrik Lissner
3cd0db82b8 Append setq-hook! hooks
So that later setq-hook! calls will overwrite earlier ones.
2018-09-20 14:31:47 -04:00
Henrik Lissner
c8b07f3caa
Fail gracefully if incremental load fails
...and continue loading other packages regardless.
2018-09-20 10:42:45 -04:00
Henrik Lissner
b653039535
Add :defer-incrementally use-package keyword 2018-09-20 10:42:45 -04:00
Henrik Lissner
9c4147bbbb
Merge pull request #891 from edwintorok/theme-elc
Load .elc even for themes
2018-09-20 09:15:19 -04:00
Henrik Lissner
1e710e94e3
Minor refactors
+ cl-flet* -> cl-flet
+ refactor display-line-numbers-mode
2018-09-19 19:43:32 -04:00
Henrik Lissner
9970fdac2c
Enable highlight-numbers-mode in conf-modes 2018-09-19 19:42:21 -04:00
Edwin Török
228204926d Load .elc even for themes
Even when an `.elc` is preset `load-theme` would attempt to load the `.el` first,
to give the opportunity to inspect the theme.
However we are loading themes automatically from (M)ELPA, and loading a
theme package is no more dangerous than loading a regular package.

So override the search order for themes and atttempt to load the `.elc`
first.
This improves startup time by ~25ms with the default theme.

Improved implementation by @hlissner.

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-09-20 00:41:54 +01:00
Henrik Lissner
ba16dd8954
Resolve symlinks in doom-emacs-dir (and inline it) 2018-09-19 19:41:46 -04:00
Henrik Lissner
cc28aacecb
Don't inline DOOMDIR in doom-private-dir
Breaks DOOMDIR when config is byte-compiled, as mentioned in #900
2018-09-19 19:27:49 -04:00
Henrik Lissner
54e8577bf6
Simplify doom|init-fonts: add xft font support
custom-set-faces is somewhat overkill for this. It overwrites any user
customizations for the default & variable-pitch faces, and saves them to
custom-file, which may cause those settings to persist even when we
don't want them to.

This new solution is a little faster, is more respective of
customizations, and adds XFT font string support.

XFT font strings are a little more powerful. For example, the :antialias
font-spec property was unreliable, but now you can use:

  (setq doom-font "Fira Mono:pixelsize=12:antialias=off")
2018-09-18 22:48:21 -04:00
Henrik Lissner
0c39e73a1e Refactor/reformat core-ui
+ Move minibuffer fringe disabler to ui/doom
+ Disable blink-cursor-mode (too distracting, causes other issues e.g.
  #892)
2018-09-18 15:19:50 -04:00
Henrik Lissner
895df84f8b Add key-to-key binding support to map!
Experimental, and will eventually be replaced by general-simulate-key.
2018-09-18 15:19:50 -04:00
Henrik Lissner
f4e119a642 Couple core-packages to package.el sooner
This way, if the user loads package.el themselves, doom's package.el
settings will take effect immediately.
2018-09-18 15:19:50 -04:00
Henrik Lissner
b96d50b3de history-length = 500 2018-09-18 15:19:50 -04:00
Henrik Lissner
e71b26b1e8 core-ui: minor reformatting/refactor 2018-09-18 15:19:50 -04:00
Henrik Lissner
4067c8937e Remove doom-major-mode-names & doom|set-mode-name
And replace it with buffer-local mode-name setters. This is more
explicit and less magical, which is easier for users to discover and
change, if they'd like.
2018-09-18 15:19:50 -04:00
Henrik Lissner
e80f5e4c85
Remove unnecessary optimization in doom-try-run-hook
Hooks run with this should already be run in a gc-deferred state (at
startup), so deferring garbage collection _again_ may just cause
unnecessary consing.
2018-09-18 11:45:13 -04:00
Henrik Lissner
b7be38b2a9
New incremental lazy-loading at startup
This is for loading large packages (like org and magit) quietly in the
background during idle time. It is already set up to incrementally load
org and magit.

This is still experimental, however. the idle timers may need to be
tweaked.
2018-09-18 11:42:35 -04:00
Henrik Lissner
a9c925c50b
Rename doom*newline-and-indent
To doom*newline-indent-and-continue-comments; to better describe what it
does.
2018-09-14 10:42:09 -04:00
Henrik Lissner
a9fdeefe15
Revert 142d364
Only add doom-private-dir to load-path during autoload generation,
otherwise a $DOOMDIR/autoload.el will shadow the built-in autoload.el
Emacs package.

Note: with `doom-private-dir' in `load-path', Doom autoloads files will
be unable to declare autoloads for the built-in autoload.el Emacs
package, should $DOOMDIR/autoload.el exist. Not sure why they'd want to
though, so it's an acceptable compromise for simpler autoload
declarations.
2018-09-14 09:39:40 -04:00
Henrik Lissner
bd39ff3526
Minor reformatting 2018-09-13 19:15:16 -04:00
Henrik Lissner
162b8dc81f
Add doom/set-frame-opacity command
I use this to play videos behind Emacs while I work.
2018-09-13 19:15:16 -04:00
Henrik Lissner
142d3646ef
Add doom-private-dir to load-path
Makes private autoload paths simpler
2018-09-13 19:15:15 -04:00
Henrik Lissner
82651be909
Remove sharp-quote on make-hash-table :test
The function isn't really expecting a function, but the 'eq, 'eql or
'equal symbols. User supplied test/hash functions must be defined with
define-hash-table-test.
2018-09-13 19:15:12 -04:00
Henrik Lissner
d9a9243a62 Remove unnecessary let block 2018-09-12 23:03:23 +01:00
Edwin Török
8f5d822363 make compile-core: fix warnings
It is easier to spot real problems if the code is warning-free.

Replacing `gensym` with `make-symbol` is an idea taken from here:
b44c08dd45

In defer-until!:
core-lib.el:150:19:Warning: function ‘gensym’ from cl package called at
    runtime

In add-transient-hook!:
core-lib.el:216:16:Warning: function ‘gensym’ from cl package called at
    runtime

In toplevel form:
autoload/message.el:35:1:Warning: Unused lexical variable ‘spec’

In toplevel form:
autoload/line-numbers.el:31:1:Warning: defcustom for
    ‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:31:1:Warning: defcustom for
    ‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
    ‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
    ‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
    ‘display-line-numbers-width-start’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
    ‘display-line-numbers-width-start’ fails to specify containing group

In toplevel form:
cli/autoloads.el:137:1:Warning: Unused lexical variable ‘type’

Preserve name of unused lexical var _type

Makes it obvious what is stored there.
2018-09-12 23:03:23 +01:00
Edwin Török
b9c966ec54 Backport to Emacs 25: avoid (setf (alist-get ... 'equal))
We would need to use `'equal` for comparison, but Emacs 25 only allows `'eq`.
Using `advice-add` to override `alist-get` does not work, because `setf`
has special handling for `alist-get`.

`repl.el`: Switch to a hash table which already supports multiple comparison
functions, and changing of elements even in Emacs 25.
`eshell/autoload/settings.el`: use conditional set-or-push.
Drop `doom*alist-get`, it is unused now.

Thanks to @hlissner for the reimplementation.
2018-09-12 23:03:02 +01:00
Edwin Török
575c3cccd9 make compile: exit with non-zero code on error
This would allow the CI to fail to compilation errors.
2018-09-12 22:55:13 +01:00
Henrik Lissner
5b807a1c72
Fix alist-get polyfill's use of assoc in Emacs 25
assoc has only two arguments in Emacs 25, but the polyfill was using its
third argument.

This was discussed in #875
2018-09-10 12:48:19 -04:00
Henrik Lissner
75036cefb0 Revert max-{specpdl-size,lisp-eval-depth} changes
They were unnecessary and could cause crashing in some cases.
2018-09-10 09:04:27 -04:00
Henrik Lissner
fe79178b1f
Revise docstrings for run/doc dispatchers 2018-09-09 23:16:55 -04:00
Henrik Lissner
7b6dbe92c0
Add doom/reload-font command 2018-09-09 18:17:12 -04:00
Henrik Lissner
41743869af Fix -y option for bin/doom compile #875 2018-09-09 16:44:17 -04:00
Henrik Lissner
11feeaea5f
Fix autoload-package::get-packages tests 2018-09-09 10:09:45 -04:00
Henrik Lissner
1b172e9f43
Better enh-ruby-mode suport in doom/describe-module & editorconfig
+ Associates enh-ruby-mode with :lang ruby for doom/describe-module
+ Enables editorconfig to detect extension-less or file-less ruby
  files (from shebang lines or file local variables).
2018-09-09 09:58:21 -04:00
Henrik Lissner
f07ae6a02b
max-specpdl-size = 5000, max-lisp-eval-depth = 2500
The defaults were designed for much, much older systems. We can safely
increase this to stave off premature abortion of intentional deeply
nested loops or excessive allocations.
2018-09-09 09:58:20 -04:00
Henrik Lissner
4d10c28c37
Change doom-ansi-apply, print! & format!
Color let-functions no longer take format string arguments. e.g.

  (format! (red "Hello %s" "world"))

Becomes

  (format! (red "Hello %s") "world")

The same goes for print!. Also, doom-ansi-apply now takes two arguments
instead of three.

Also merges doom-message-{fg,bg,fx} into doom-ansi-alist, and reduces
backtrace noise when errors originate from inside these macros.
2018-09-09 09:58:20 -04:00
Henrik Lissner
f7ad520ee0
doom update: prevent GC in async instances
Offers a marginal improved to outdated check times.
2018-09-09 09:58:20 -04:00
Henrik Lissner
309fd767d6
Add :deps property to doom-get-packages
Also fixes an issue where doom install wouldn't catch missing
dependnecies of desired packages.

If :dep is non-nil, doom-get-packages will include package dependencies
in the resulting package list.
2018-09-09 09:58:20 -04:00
Henrik Lissner
77d2d84e14
Refactor core-cli
Moved to separate files for better organization.
2018-09-09 09:58:20 -04:00
Henrik Lissner
57579b883b
Refactor doom core files 2018-09-09 09:58:20 -04:00
Henrik Lissner
49e6e68a07
Use EMACS26+ to detect native line numbers
Checking for the 'display-line-numbers symbol property is clumsy and
checking for boundp is pointless now that we have a Emacs 25 polyfill
for display-line-numbers-mode.
2018-09-09 09:58:19 -04:00
Henrik Lissner
be29623f0d
Reorganize doom core-lib & reformat autoload/ui.el
+ Move doom-files-in to autoload/files.el
+ Move doom*shut-up to autoload/ui.el
+ Reorganize autoload/ui.el
2018-09-09 09:58:19 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
a0250e60e3
Add rainbow-delimiters in lang/common-lisp instead
Gives users one place to look to determine what cosmetic hooks are
applied in lisp-mode.
2018-09-09 09:58:19 -04:00
Henrik Lissner
8b7404bf75
Refactor hl-line eob fix in Emacs 26+ 2018-09-09 09:58:18 -04:00
Henrik Lissner
84abac6b69
Remove def-menu!; use :localleader keys instead
def-menu was clumsy. We could use a better UI for refactoring commands,
but they should be available via localleader keybinds in any case.
2018-09-09 09:58:18 -04:00
Henrik Lissner
d2f9d28577
doom-project-(find-file|browse): resolve symlinks
This prevents absolute paths appearing in many find-in/browse commands,
like +default/find-in-emacsd, +default/find-in-config, or
+default/browse-project.
2018-09-09 09:58:18 -04:00
Henrik Lissner
1f3fa61c2b
Allow debugging in doom quickstart 2018-09-09 09:58:18 -04:00
Patrick Elliott
475e2f9982
Fix unicode regression 2018-09-04 10:13:48 +02:00
Patrick Elliott
939dd93e79
Impose fallback behaviour 2018-09-03 13:14:59 +02:00
Henrik Lissner
eaa10946f1
Refactor startup optimizations
+ Add doom-gc-cons-upper-limit variable
+ Don't use most-positive-fixnum, in case Emacs somehow wants to
  allocate that much!
+ Don't use startup optimizations in noninteractive sessions
+ Restore gc-cons-threshold on idle timer, instead of hook (to defer the
  possible GC pause and so deferred packages can take advantage of these
  optimizations).
2018-09-03 03:58:43 +02:00
Henrik Lissner
3a23ff56cd
General formatting & minor refactors 2018-09-02 17:20:19 +02:00
Henrik Lissner
daef19ba64
Defer garbage collection in the minibuffer
This can speed up things that run in or from the minibuffer, like
projectile/helm/ivy commands.
2018-09-02 17:06:12 +02:00
Henrik Lissner
a581b7fc3f
Remove jit-lock-* options
Only jit-lock-stealth-nice is different from the default, and slows down
some scrolling operations without helping much. It may be better to
conditionally enable this in larger buffer.
2018-09-02 15:56:45 +02:00
Henrik Lissner
b3fb3ef55f
Fix highlight-numbers in elixir-mode
The new highlight-numbers regexp depends on a mode to have a well
defined syntax table. elixir-mode does not appear to be one of those
modes.
2018-09-02 15:15:58 +02:00
Henrik Lissner
32de22b1d2
Remove :load-path
Gah, it snuck in again! Sneaky punk...
2018-09-02 13:01:06 +02:00
Henrik Lissner
83a843bfe6
Fix void-function doom|fix-whitespace-mode-in-childframes
Function was renamed.
2018-09-01 16:30:17 +02:00
Henrik Lissner
712b775f36
Remove doom*set-indirect-buffer-filename hack
This was done to help the modeline build its file path in indirect
buffers, but this has been fixed by using buffer-base-buffer.

Both ui/modeline and ui/doom-modeline have been refactored to
accommodate this.
2018-09-01 12:39:26 +02:00
Henrik Lissner
72d8c5dd56
New doom/delete-trailing-newlines command 2018-09-01 12:30:34 +02:00
Henrik Lissner
708ad138c8
doom/sudo-find-file: don't sudo writeable files 2018-09-01 00:02:39 +02:00
Henrik Lissner
44e536e8e8
Refactor core-ui
+ Remove doom/switch-theme (replaced with an advice for load-theme)
+ Reorganize core-ui
+ Fix Emacs 26+ hl-line hack being applied for Emacs 25 users
+ Rename doom|show-whitespace-maybe to doom|highlight-non-default-indentation
+ Disable tool-bar, menu-bar and vertical-scroll-bars via
  default-frame-alist; this is a little faster than using the minor
  modes.
2018-08-31 23:44:08 +02:00
Henrik Lissner
4e2bd22869
Don't chmod +x scripts
This silent change is a bit too intrusive. It's convenient, but let the
user decide to use it, rather than force it on them.
2018-08-31 23:36:54 +02:00
Henrik Lissner
d80e79203a
Replace delete-trailing-whitespace with ws-butler
ws-butler only strips trailing spaces on lines that have been modified.

+ ws-butler is disabled if editorconfig enables
  trim_trailing_whitespace, which resorts to delete-trailing-whitespace
  instead.
+ Updates doom|(enable|disable)-delete-trailing-whitespace hooks to use
  ws-butler-mode.
2018-08-31 13:59:12 +02:00
Henrik Lissner
2c5ccaa864
Update patch-macos documentation
Follows up on 0fc9b6be
2018-08-31 00:19:34 +02:00
Henrik Lissner
c1fa37245f
Fix dtrt-indent errors in broken smie modes
Some smie modes throw errors when trying to guess their indentation,
like `nim-mode'. This prevents them from leaving Emacs in a broken
state.
2018-08-30 22:39:03 +02:00
Henrik Lissner
edc9bf70af
Delete trailing whitespace, globally, by default
Also adds doom|disable-delete-trailing-whitespace hook, which can be
used to disable this behavior on a per-buffer basis. If you want to turn
off this global behavior:

  (remove-hook 'write-file-functions #'delete-trailing-whitespace)
2018-08-30 20:36:15 +02:00
Henrik Lissner
2d21f1af6d
Fix comparison link for doom upgrade
The hashes were the wrong way around.
2018-08-30 13:36:21 +02:00
Henrik Lissner
25cc01ce41
Fix & refactor doom/open-vanilla-sandbox
It would fail to run the new instance because the arguments send to it
were incorrectly formatted.
2018-08-30 13:29:56 +02:00
Henrik Lissner
cc1b0f7ee6
Show comparison diff link on bin/doom upgrade 2018-08-30 00:42:34 +02:00
Henrik Lissner
0fc9b6be91
Improve patch-macos wrapper script
Reported to produce better results.
2018-08-29 23:01:59 +02:00
Henrik Lissner
902386b60f
Fix file-missing error during patch-macos
Forgot to add Emacs.app to the end of the directories to be searched!
Whoops!
2018-08-29 12:44:09 +02:00
Henrik Lissner
d6695d4cf3
Update doom/toggle-line-numbers #847
Now that display-line-numbers-mode has been backported to Emacs 25, we
can use it instead of interacting with nlinum directly.
2018-08-29 02:15:51 +02:00
Henrik Lissner
9ee1d8d0e2
Set indent function for dispatcher! macro 2018-08-28 19:14:18 +02:00
Henrik Lissner
ef6e09dac9
Search for Emacs.app in /usr/local/opt
And refactors doom-patch-macos function, its dispatcher, and its usage
in doom-quickstart.
2018-08-28 19:13:34 +02:00
Henrik Lissner
2b560a6a0e
General & minor refactoring 2018-08-28 13:36:44 +02:00
Henrik Lissner
6318572d10
Fix invalid marker in doom/window-enlargen #825 2018-08-27 20:07:17 +02:00
Henrik Lissner
d8fa5f39ad
Omit undefined/disable keybinds in which-key
This is for commands in disabled modules. This does not disable their
keybinds, but it stops them from showing up in which-key.
2018-08-26 16:38:35 +02:00
Henrik Lissner
d7e4901bda
Disable bottom-up root search if HOME is a project #833 2018-08-26 12:19:47 +02:00
Henrik Lissner
247b219ea1
doom-project-find-file: set default-directory too #833
Be extra sure!
2018-08-26 12:00:13 +02:00
Henrik Lissner
1a6ee8e0df
Fix doom-project-find-file if $HOME is a repo #833
If HOME is a repo, projectile resolves all project roots to HOME. This
fixes any commands that rely on this project resolution by explicitly
telling them what project they're in instead.
2018-08-26 11:47:04 +02:00
Henrik Lissner
300181aba3
Move custom hooks in core.el closer to top
Conform to the Doom/lisp convention of defining customizable elements
close to the top of files.
2018-08-26 00:20:18 +02:00
Henrik Lissner
469aa81570
Forward-require dependencies in tests
Easier to see at a glance what the test's dependencies are.
2018-08-26 00:20:16 +02:00
Henrik Lissner
631c4004ba
Load custom-file only once & after user's config
This change facilitates the users that prefer their custom-file
somewhere other than doom-local-dir (e.g. in ~/.doom.d/custom.el).

This change prevents loading both files during startup. Just change
`custom-file` and Doom will load it after your config.el is loaded (but
before doom-post-init-hook runs).
2018-08-25 19:45:23 +02:00
Henrik Lissner
7510f5abf0
bin/quickstart: fix wrong-number-of-args error 2018-08-25 12:02:19 +02:00
Henrik Lissner
8e092b9884
Refactor doom-quit-p 2018-08-25 04:01:35 +02:00
Henrik Lissner
33b0a8d36c
bin/doom quickstart: Offer to patch Emacs.app 2018-08-25 03:40:00 +02:00
Henrik Lissner
77838534ce
Polyfill line-number-display-width for Emacs 25
Fixes void-function line-number-display-width errors (used in
company-pseudo-tooltip-frontend).
2018-08-25 03:16:32 +02:00
Henrik Lissner
08c09c2898
bin/doom patch-macos: show "Patching X" message 2018-08-24 01:12:05 +02:00
Henrik Lissner
c5f3cc17c5
Fix doom quickstart not respecting -y/--yes #817 2018-08-23 17:31:21 +02:00
Henrik Lissner
9eae0860c6
Fix doom/window-enlargen in popup windows #825 2018-08-23 17:21:42 +02:00
Henrik Lissner
fa81f7ed71
Improve doom patch-macos documentation
Makes doom help patch-macos more informative, and simplifies
confirmation prompt when using it.
2018-08-23 16:49:03 +02:00
Henrik Lissner
1890356d11
Refactor & fix vanilla sandbox in tty Emacs
Except for Windows users. Doesn't seem to be possible to suspend and
foreground Emacs in windows' shell.
2018-08-23 16:18:56 +02:00
Henrik Lissner
12f6add329
package-initialize for doom/open-vanilla-sandbox 2018-08-23 11:27:27 +02:00