Commit Graph

139 Commits

Author SHA1 Message Date
Henrik Lissner
56fd62063e
Do not remap delete-window directly in popups #238 2017-10-18 16:52:55 +02:00
Henrik Lissner
4a1865c450
Don't autofit help popups
They become too small.
2017-10-06 20:42:40 +02:00
Henrik Lissner
cd7ab060e0
General refactor & docstring updates 2017-10-05 17:02:59 +02:00
Henrik Lissner
3bcd0c1071
Major refactor of the popup management api 2017-10-03 02:47:11 +02:00
Henrik Lissner
6c68ff0b96
Adjust popup rules 2017-09-28 18:19:16 +02:00
Henrik Lissner
f78fd0d91a
Add shackle compatibility for eww browser 2017-09-28 18:19:16 +02:00
Henrik Lissner
a4ddb1bc9b
General minor refactor + cleanup 2017-09-28 18:19:15 +02:00
Henrik Lissner
74eaed414e
Silently autokill processes in closed popups 2017-09-27 14:48:23 +02:00
Henrik Lissner
b4aadb100e
Remove unnecessary org-agenda bindings from popup hacks 2017-09-27 01:26:29 +02:00
Henrik Lissner
3fdcb1ec08
Add specific popup rule for the scratch buffer 2017-09-27 01:25:26 +02:00
Henrik Lissner
546ca0e313
General, minor refactor 2017-09-26 21:55:01 +02:00
Henrik Lissner
86ff43c6cb
Minor refactor of popup rules logistics 2017-09-26 20:37:08 +02:00
Henrik Lissner
ee1e9a853c
Fix :autokill popup property not being respected 2017-09-26 20:37:08 +02:00
Henrik Lissner
cf7b27f4eb
popups: :fixed => :static, major changes to popup API
+ New command: doom/popup-kill-all
+ Update references to :fixed (now named :static)
+ Simplified doom-popup-p; moved :static filtering to
  doom-popup-windows.
+ New :autofit popup property, which resizes the popup to fit its
  content, if possible.
+ doom-popup-windows now takes one boolean argument: whether to ignore
  static popups or not.
2017-09-26 20:37:08 +02:00
Henrik Lissner
e7a9a1a3ca
Improve support for moving popup windows (WIP)
Now, the +evil/window-move-* commands are consistent when used with
popups. Also added doom/popup-move-* as popup-alternatives to
evil-window-move-{very,far}-* commands.

Relevant to #141 #171
2017-09-25 13:02:27 +02:00
Henrik Lissner
6de185409f
New macro: save-popups! 2017-09-25 02:58:59 +02:00
Henrik Lissner
cfb094e589
Add :fixed property to popup rules 2017-09-24 20:46:22 +02:00
Henrik Lissner
3dca6d8028
doom-popup-prop => doom-popup-property
Also, new doom-popup-properties function.
2017-09-24 20:45:23 +02:00
Henrik Lissner
65d758ce8f
Add doom-popup-inhibit-autokill variable 2017-09-24 20:44:17 +02:00
Henrik Lissner
558a8d973c
Change doom-popup-buffer & doom-popup-file signature
...and update its references.
2017-09-24 20:41:14 +02:00
Henrik Lissner
cd3c51f489
Update comments/docstrings in core-popups 2017-09-24 17:10:48 +02:00
Henrik Lissner
7fe0ec0be7
Incorporate neotree vars into popup rule 2017-09-24 17:10:47 +02:00
Henrik Lissner
9b0aaee631
Fix neotree window shrinking when closing splits
Caused when rebalancing windows with sub-character-width fringes. Fixed
by forcibly resizing the neotree window to the correct width each time
it is restored by doom*popup-save.
2017-09-24 17:10:47 +02:00
Henrik Lissner
fa981ffd3c
Enable shackle-mode later in startup process 2017-07-13 00:00:35 +02:00
Henrik Lissner
64aa0fef4d
Appease byte-compiler 2017-07-13 00:00:35 +02:00
Henrik Lissner
9a74124ede
Add lang/plantuml 2017-07-08 23:39:03 +02:00
Henrik Lissner
8c3693ed47
Add new variable: doom-popup-windows
Contains a list of open popup windows.

This preserves window order. Before this commit, doom-popup-windows (the
function), did not do this.
2017-07-06 17:43:17 +02:00
Henrik Lissner
ecd8ad0f46
Change how themes, fonts & modelines are loaded
WARNING: THIS IS A BREAKING CHANGE FOR THEME/FONT/NLINUM CUSTOMIZATIONS.

This change was motivated by the need to decouple theme and font loading
from the ui/doom module.

Now, it is doom-core's purview. Theme and fonts are loaded after
initfiles are read (attached to the doom-init-ui-hook hook), giving
other modules (especially private ones) a chance to change the theme or
fonts.

+ Refactor core-ui.el
+ New init hook: doom-init-ui-hook
+ Decouple theme/font loading from ui/doom
+ Load modelines are doom-init-ui-hook
+ New theme/font variables (replaces old ui/doom variables)
  + doom-theme
  + doom-font
  + doom-variable-pitch-font
  + doom-unicode-font
+ Change nlinum variables
  + doom-line-number-lpad
  + doom-line-number-rpad
  + doom-line-number-pad-char

Addresses #117
2017-06-28 16:18:24 +02:00
Henrik Lissner
a894f3ee1e
Move persp-mode popup fix to core-popups 2017-06-28 12:26:50 +02:00
Henrik Lissner
56d7c78e00 Expand :popup docstring 2017-06-24 02:25:15 +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
9c93c453e8
Reorganize unit-tests and test workflow
+ Moved unit tests out of tests/ and into their respective modules.
+ Rewrite makefile and added these tasks:
  + <MODULE>/<SUBMODULE> -- byte-compile a specific module
  + test:<MODULE>/<SUBMODULE> -- runs tests for a specific module
  + testi -- run tests in an interactive session of Emacs (WIP)
  + run -- opens an Emacs session with this config; useful when it is in
    a non-standard location.
2017-06-14 21:15:19 +02:00
Henrik Lissner
c1890307a6
Fix precedence of popup rules
More general rules should be lower in the list.
2017-06-13 17:52:06 +02:00
Henrik Lissner
4984a548d1
Refactor DOOM init & add new init hooks
+ Add doom-init-hook and doom-post-init-hook to simplify Emacs init
  hooks into less ambiguous ones.
+ Attach former after-init-hook and emacs-startup-hook hooks to new doom
  init hooks.
+ Vastly improves daemon and tty support: preventing incorrect colors
  from bleeding across face class barriers, and into GUI Emacs and vice
  versa, when spawned with emacsclient.
+ Fix persp-mode breaking Emacs daemon, and ensuring that initialization
  is done properly in terminal Emacs (and emacsclient frames).
2017-06-12 00:37:14 +02:00
Henrik Lissner
085fbb3f72
core-popups: optimize + refactor 2017-06-10 01:54:33 +02:00
Henrik Lissner
a30b0efce5
Add doom-popup-no-fringe option; disable fringes in popups 2017-06-10 01:54:15 +02:00
Henrik Lissner
bab738c56c
Move helm popup settings to core-popups 2017-06-10 01:53:51 +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
baad7953bf
Breaking change: rewrite add-transient-hook!
HOOK is now evaluated. Hooks should be quoted (and functions
sharp-quoted).

This also fixes commit 0150f78e.
2017-06-05 16:43:14 +02:00
Henrik Lissner
c381b800cb Revise shackle-rule precedence; add Info+shackle 2017-05-28 02:48:20 +02:00
Henrik Lissner
85751c519b Refactor +evil-esc-hook 2017-05-25 12:22:05 +02:00
Henrik Lissner
d4a6b96db6 Close dead comint windows on ESC (w/ evil) 2017-05-25 12:20:11 +02:00
Henrik Lissner
656452df00 General cleanup & refactor; update TODO 2017-05-19 17:21:52 +02:00
Henrik Lissner
914b0fae43 Don't intercept evil-force-normal-state in popups
If we remap evil-force-normal-state, we're bypassing all the useful
cleanup hooks attached to +evil-esc-hook, which is bothersome in popups
we want to do some editing in.
2017-05-19 13:04:49 +02:00
Henrik Lissner
c2fcebdb75 Tweak popup rules; smaller default :size 2017-05-19 03:00:42 +02:00
Henrik Lissner
b0bb013601 General refactor & cleanup + update TODO 2017-05-17 18:27:02 +02:00
Henrik Lissner
54383a8dde Move wgrep popup config to core-popups 2017-05-17 18:27:02 +02:00
Henrik Lissner
a6c4aace90 Better magit+shackle integration 2017-05-17 18:27:02 +02:00
Henrik Lissner
199432c0ac Update popup rules + doc comments 2017-05-17 01:32:19 +02:00
Henrik Lissner
b679a86452 feature/evil: improve neotree popup integration 2017-05-16 18:05:39 +02:00