Commit graph

39 commits

Author SHA1 Message Date
Henrik Lissner
c71a73e43b
feature/eval: split shrink-window & scroll-to-bof hook
Easier to customize.
2018-12-06 17:45:53 -05:00
Henrik Lissner
ab95ae1975
feature/eval: minor refactor
Now that I've "backported" display-line-numbers to Emacs 25, it isn't
necessary to conditionally enable nlinum-mode.

Also, use after! isntead of def-package!; this usage is equivalent, and
after! imposes less overhead.
2018-10-19 22:01:01 -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
6808c46b58
💥 Change set-popup-rule! usage
Now accepts a flat plist of all its former parameters, including new
:parameters and :actions properties to increase your control over the
fate of your windows.

The old usage of set-popup-rule! is deprecated and may not work right!

The :ui popup module has also seen a major refactor to improve
efficiency and load times.

Sorry! This is the last "big" change before 2.1!
2018-06-18 02:34:16 +02:00
Henrik Lissner
d8b1e469bc
Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
866030bdc6
feature/eval: reorganize; move settings into init.el 2018-05-14 13:05:03 +02:00
Henrik Lissner
523c6ae4cc
feature/eval: remove redundant popup rule 2018-01-31 02:16:25 -05:00
Henrik Lissner
d443aed25c
feature/eval: improve compatibility with feature/popups
This makes quickrun, *doom eval* and *Pp Eval Output* buffers behave
better.

Eval output buffers should a) shrink themselves to the size of their
output (within reason), b) *not* grab focus, and c) be easy to close
from afar with C-g/Escape.

Gotchas:

1. Quickrun gets output asynchronously, so we shrink it on
   quickrun-after-run-hook, not in the popup rule.
2. *doom eval* and *Pp Eval Output* opens with its output ready, so the
   popup system may shrink those to fit.
3. *doom eval* and *Pp Eval Output* handle window selection themselves.
   Let them by setting the select window parameter to #'ignore.
2018-01-08 17:30:54 -05:00
Henrik Lissner
2d9e63d5bb
General & minor refactoring 2018-01-07 00:15:58 -05:00
Henrik Lissner
b681917082
Remove/replace references to doom-popup-buffer 2018-01-06 03:27:23 -05:00
Henrik Lissner
91357a3e5d
💥 Replace core-popup with new feature/popup module
This is a breaking change! Update your :popup settings. Old ones will
throw errors!

Doom's new popup management system casts off its shackles (hur hur) and
replaces them with the monster that is `display-buffer-alist`, and
window parameters.

However, this is highly experimental! Expect edge cases.  Particularly
with org-mode and magit (or anything that does its own window
management).

Relevant to #261, #263, #325
2018-01-06 02:17:43 -05:00
Henrik Lissner
76a4ae459d
Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
Henrik Lissner
bdea695b5a
Fix quickrun output popups being too small
There is no guarantee that the quickrun buffer will have all its output
when spawned, making :autofit unpredictable; usually making them too
small, so we disable :autofit and do it manually, once the output is
ready.
2017-10-03 15:47:49 +02:00
Henrik Lissner
d0fcb23314
Replace feature/eval build system with def-menu! 2017-10-03 02:58:09 +02:00
Henrik Lissner
327993a382
Adjust eval output popup rules 2017-09-27 01:24:38 +02:00
Henrik Lissner
0264fc25ff
Don't use nlinum-mode for quickrun buffers in emacs 26+ 2017-09-24 17:10:49 +02:00
Henrik Lissner
392c58ea47
General refactor & cleanup 2017-06-19 00:32:45 +02:00
Henrik Lissner
928812da8a
Make def-setting! behave more like defmacro
set! used to aggressively evaluate its arguments (at expansion-time),
even if placed inside an after! block. This causes unavoidable errors if
those arguments use functions/variables that don't exist yet.

Fixes #112
2017-06-19 00:32:44 +02:00
Henrik Lissner
719e272374
quickrun: use nlinum instead of linum 2017-06-09 01:09:20 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
dbceec4149 Refactor + rearrange popup rules 2017-05-15 20:26:33 +02:00
Henrik Lissner
d0cfb12689 feature/eval: silence linum-mode activation in quickrun 2017-05-15 20:26:33 +02:00
Henrik Lissner
c5b1d56002 Move quickrun popup-specific config to core-popups + update rules 2017-05-13 22:42:59 +02:00
Henrik Lissner
afb31659a3 General refactor & cleanup 2017-05-13 00:14:17 +02:00
Henrik Lissner
2405e1aa4c Fix +eval/region failing on first invocation 2017-05-08 10:46:11 +02:00
Henrik Lissner
4aa1427811 feature/eval: :eval now accepts functions (refactor emacs-lisp eval fn) 2017-05-07 02:45:52 +02:00
Henrik Lissner
db4d246a9e feature/eval: quickrun/mode-hook => quickrun--mode-hook 2017-04-18 05:09:15 -04:00
Henrik Lissner
9e084c18ba core-ui: fix doom-hide-modeline-mode resetting on major-mode changes 2017-04-18 05:09:15 -04:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
841e91938b Fix build system (untested) 2017-04-07 01:46:32 -04:00
Henrik Lissner
db7cf68775 General tweaks 2017-03-19 22:50:57 -04:00
Henrik Lissner
74d50f6159 feature/eval: rewrite module 2017-03-04 18:29:55 -05:00
Henrik Lissner
4356f894fd General cleanup + refactor 2017-02-28 12:12:18 -05:00
Henrik Lissner
e55fdee640 features/eval: fix #30 (part 2) 2017-02-27 21:28:40 -05:00
Henrik Lissner
6a8b6dd041 features/eval: fix :eval setting causing void-variable errors (fix #30) 2017-02-27 21:22:10 -05:00
Henrik Lissner
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -05:00
Henrik Lissner
35ae1965a7 Update modules/feature/eval 2017-02-20 00:26:08 -05:00
Henrik Lissner
77ce31d8e0 Add modules/feature/eval (WIP) 2017-02-20 00:26:07 -05:00