Commit Graph

2955 Commits

Author SHA1 Message Date
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