Commit Graph

49 Commits

Author SHA1 Message Date
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
9245e030bb
Fix doom/reload-font for XFT fonts 2018-09-20 22:22:14 -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
7b6dbe92c0
Add doom/reload-font command 2018-09-09 18:17:12 -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
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
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
6318572d10
Fix invalid marker in doom/window-enlargen #825 2018-08-27 20:07:17 +02:00
Henrik Lissner
8e092b9884
Refactor doom-quit-p 2018-08-25 04:01:35 +02:00
Henrik Lissner
9eae0860c6
Fix doom/window-enlargen in popup windows #825 2018-08-23 17:21:42 +02:00
Henrik Lissner
4618b7afad
Refactor & reformat core-ui 2018-08-21 02:56:54 +02:00
Henrik Lissner
6b7f97f4fc
Autoload doom-quit-p & revise its docstring 2018-08-20 23:56:56 +02:00
Henrik Lissner
5714ff423a
Fix evil jumplist after jumping to ag match
helm-ag would formerly add multiple entries to the jump list. It now
only adds one, and recenters the window when jumping to an ag match.
2018-08-13 21:47:55 +02:00
Henrik Lissner
43e0314e86
Add doom/switch-theme; a more sensible load-theme
load-theme doesn't disable previously enabled themes before switching.
doom/switch-theme does.

This remaps any keys bound to load-theme to doom/switch-theme.
2018-08-11 01:59:37 +02:00
Henrik Lissner
03022d09f9
Remove doom//x naming convention
This naming convention was meant to be for batch commands, but it grew
to include "commands that were helpful with managing Doom", but many of
these commands shouldn't be interactive in the first place!
2018-06-17 21:35:58 +02:00
Henrik Lissner
80adb9c1f6
General refactor for consistency & idempotency
Also updated comments
2018-05-18 01:26:41 +02:00
Henrik Lissner
bc6000a731
Refactor doom//reload-theme; remove obsolete hooks 2018-03-22 23:26:58 -04:00
Henrik Lissner
160902bd18
Remove doom/toggle-fullsreen; redundant with toggle-frame-fullscreen 2018-02-02 20:47:34 -05:00
Henrik Lissner
c9e8be1f60
Improve doom/toggle-fullscreen #397 2018-02-01 17:42:39 -05:00
Henrik Lissner
bcef66b947
Refactor doom/toggle-line-numbers; add doom-line-numbers-visual-style #376
doom-line-numbers-visual-style adds support for the visual
display-line-numbers mode by setting it to a non-nil value.
2018-01-30 03:31:32 -05:00
Henrik Lissner
64a674dcc9
Fix nlinum-relative line numbering #376
Fixed padding; now relative line numbers look consistent with its non-relative
counterpart.
2018-01-30 01:18:30 -05:00
Henrik Lissner
01787fc876
Change doom/toggle-line-numbers to cycle styles #376
Also fixes doom/toggle-line-numbers when doom-line-numbers-style is nil.
2018-01-30 01:10:58 -05:00
Henrik Lissner
60fdbf8643
doom/window-enlargen: use maximize-window instead
Just discovered maximize-window, which I've been doing manually in
doom/window-zoom. Bueno.
2018-01-07 01:58:38 -05:00
Henrik Lissner
2088afa08a
Update docstrings for doom/window-{zoom,enlargen}
Perhaps rethink their names?
2017-12-08 22:15:30 -05:00
Henrik Lissner
95a5b46dc5
New // naming convention + refactor doom management functions 2017-11-05 19:54:43 +01:00
Henrik Lissner
78b6676987
doom-resize-window: add two args (window & force-p) 2017-09-24 17:10:47 +02:00
Henrik Lissner
f2d8681ef4
Refactor line number implementation
+ Add relative line number support (see doom-line-numbers-style)
+ Update doom/toggle-line-numbers
+ New hook functions: doom|enable-line-numbers,
  doom|disable-line-numbers

Addresses #156
2017-07-19 00:25:05 +02:00
Henrik Lissner
c0bfaec9d4
Add display-line-numbers support in Emacs 26 #59 2017-07-12 23:59:38 +02:00
Henrik Lissner
6093b81412
+present/big-mode => doom-big-font-mode
And added new variable: doom-big-font

app/present is deprecated so this feature has been moved into core.
2017-07-05 02:58:50 +02:00
Henrik Lissner
cca37f2508
Add doom-(pre|post)-reload-theme-hook 2017-06-29 14:58:10 +02:00
Henrik Lissner
fa47730204
Fix void-function error in doom/reload-theme 2017-06-29 11:58:58 +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
66cfbb2563
Fix quit confirmations in daemon; add for frames
+ Add quit confirmation when closing a frame with real buffers
+ Ensure quit confirmations also work in daemon frames (tty or gui)
2017-06-11 16:24:49 +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
e2f06f0692 Fix doom/toggle-line-numbers 2017-05-28 15:39:36 +02:00
Henrik Lissner
8ca6e2630b Bring back nlinum
linum-mode *really* slows down buffers when they're displayed in more
than one window. This lag isn't present in nlinum. nlinum isn't perfect
either but... lesser of two evils.

This includes advisors and an ESC hook to mitigate the issue of
disappearing nlinum line numbers.
2017-05-28 02:48:20 +02:00
Henrik Lissner
656452df00 General cleanup & refactor; update TODO 2017-05-19 17:21:52 +02:00
Henrik Lissner
d6220201d7 Fix #70: doom--window-enlargened error 2017-05-19 15:56:35 +02:00
Henrik Lissner
6eb5f1c8d1 Add doom/window-enlargen (replace C-w o bind) 2017-05-19 03:00:27 +02:00
Henrik Lissner
5491fd552e Replace nlinum with linum 2017-05-13 22:40:52 +02:00
Henrik Lissner
2044872b9b Move doom/reset-theme to ui/doom (and update binding) 2017-05-11 21:45:50 +02:00
Henrik Lissner
3dcc423308 Refactor doom/window-zoom
Inspired by gilbertw1/bmacs's +gdoom/toggle-maximize-buffer
2017-05-11 09:48:26 +02:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
ba9e7a947b Remove provide's in autoload libraries (unnecessary) 2017-04-04 22:16:39 -04:00
Henrik Lissner
a46829a06c Add doom/window-zoom to core/autoload/ui 2017-02-20 00:26:08 -05:00
Henrik Lissner
bc402868a6 Add provide's to module config.el files + fix module header comments 2017-02-20 00:23:08 -05:00
Henrik Lissner
d30027aaea General cleanup 2017-02-20 00:23:05 -05:00