Commit Graph

226 Commits

Author SHA1 Message Date
ed1a79040e Revert async package refresh
Unnecessary complexity for negligible gain.
2017-07-04 12:26:34 +02:00
8c1fb1e6b2 +doom:scratch-buffer => doom/scratch-buffer 2017-07-03 03:39:18 +02:00
a002f7025c Rewrite docstrings for package functions/macros 2017-07-02 16:47:27 +02:00
cca37f2508 Add doom-(pre|post)-reload-theme-hook 2017-06-29 14:58:10 +02:00
fa47730204 Fix void-function error in doom/reload-theme 2017-06-29 11:58:58 +02:00
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
76b020eddb package management: change output on retry/errors 2017-06-28 15:33:19 +02:00
f246d89fb6 Fix make test:X/Y where Y is omitted
This way, make feature will run all unit tests in feature/* modules.
2017-06-28 15:28:51 +02:00
869bc03ca6 Load bare minimum for tests 2017-06-28 15:28:13 +02:00
510e7116c8 Use different function for :cleanup 2017-06-28 12:26:49 +02:00
5ebda9b0c6 Refactor buffer functions & update tests
+ Split doom-buffer-list into doom-buffer-list
  & doom-project-buffer-list.
+ doom-real-buffers-list => doom-real-buffer-list (for naming
  consistency).
2017-06-28 12:26:49 +02:00
822c78554f destructuring-bind => cl-destructuring-bind 2017-06-25 02:04:50 +02:00
cbfb3eeda4 Fix, rename & move doom/run-tests => doom-run-tests 2017-06-24 17:15:22 +02:00
83f4f2e725 Remove s.el dependency in doom/packages-update 2017-06-24 02:25:15 +02:00
e2c161cbf8 Clean up doom-get-outdated-packages 2017-06-24 02:25:15 +02:00
50f924bcfc Fix doom-ansi-apply alias to autoload in format!
A wrong-type-argument: symbolp error occurs when core files are
byte-compiled and the expanded message!/format! macros are trying to
cl-flet-alias 'color to doom-ansi-apply (which hasn't been loaded yet).
2017-06-24 02:25:15 +02:00
ee1fb43b93 Make doom-get-outdated-packages asynchronous 2017-06-21 16:09:58 +02:00
8f7e138357 Add debug! macro 2017-06-21 16:09:34 +02:00
7029d287e5 Add doom/toggle-profiler 2017-06-18 23:43:08 +02:00
633e693cab {Fix,Refactor} doom/describe-{setting,module} 2017-06-14 21:15:19 +02:00
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
cacd188286 Replace doom-package-*-p with doom-package-prop 2017-06-14 21:15:19 +02:00
732dee608a Stability/error-handling refactor (part 1)
This refactor is about improving how Emacs deals with errors.

A large net is now cast at startup to catch possible errors, produce
more helpful error messages, and localize the damage. Significantly
reducing the risk of later modules not loading (and leaving you
stranded in a half-broken Emacs session).

The DOOM core files are an exception. If something messes up in there,
it *should* choke.

+ use-package will now report missing packages or slow-loading/broken
  def-package! configurations.
+ Persp-mode no longer (inadvertantly) hides buffers that pop up at
  startup, like the *Warnings*, *Backtrace* or debugger buffers.
+ `make autoloads` (or doom/reload-autoloads) now produces a slightly
  more informative error message if an error occurs while building the
  autoloads file.
+ Error handling for package management is *slightly* better now; error
  messages now include the type of error; this needs work.
2017-06-14 21:15:19 +02:00
d9d049549f By default, empty buffer-file-name = unreal buffer 2017-06-12 14:28:59 +02:00
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
7c20a43be6 Clean up quelpa build repos on package deletion 2017-06-10 23:32:59 +02:00
de8269acf8 fixup! Fix doom/what-face not handling face plist specs 2017-06-10 16:10:59 +02:00
ca222c1b75 Fix doom/what-face not handling face plist specs 2017-06-10 16:07:56 +02:00
1ef4d6f190 Optimize buffer library (reduce function calls) 2017-06-09 01:18:31 +02:00
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
4d487c3e0f Rewrite buffer tests; refactor doom-kill-buffer 2017-06-08 13:46:23 +02:00
7b5d2063f8 doom-popup-p: don't require window for buffer target 2017-06-08 13:45:04 +02:00
c60de062ce doom/what-minor-mode: accept symbols & handle errors 2017-06-08 11:16:44 +02:00
b4986e908a doom/what-face: return list noninteractively 2017-06-08 11:16:44 +02:00
655e565fe0 doom/what-face: accept pos arg 2017-06-08 11:16:44 +02:00
a2f14183a1 Fix double package-refresh on first install 2017-06-06 12:01:10 +02:00
27bfa14def General refactor + cleanup 2017-06-05 14:23:17 +02:00
435fda0f41 Add :ignore & :freeze support to package! 2017-06-05 14:21:07 +02:00
e8a94535da Fix package update not deleting old folder 2017-06-05 12:35:51 +02:00
1c6ecc660a Improve package management feedback
With quelpa updating fixed, there is a longer delay on package update.
So I added a 'looking for outdated packages...' message, and improved
the formatting of backtraces in debug output.
2017-06-03 21:31:16 +02:00
ca96b0d9c5 Fix wrong-type-argument on quelpa package update 2017-06-03 21:30:41 +02:00
09ec857c60 Fix outdated quelpa package detection 2017-06-03 21:29:33 +02:00
6807a5fda8 Rewrite how doom-update-package updates from ELPA
This is an attempt to make package updating atomic. Previously, if
a package failed to update, it would've been deleted.
2017-06-03 21:01:32 +02:00
45627d6ea6 Initialize more state for package management fns 2017-06-03 12:05:43 +02:00
e4a6780775 How did I miss this mistake?! Argh!
Must've slipped through during one of a 4am debugging session.
2017-06-03 12:05:43 +02:00
e2f06f0692 Fix doom/toggle-line-numbers 2017-05-28 15:39:36 +02:00
29091c40ad Refactor doom-refresh-packages (and make it async) 2017-05-28 02:48:20 +02:00
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
db6de01b16 Add doom/describe-{setting,module} 2017-05-28 02:48:20 +02:00
42a63c661b Use persistent-soft's native TTL expiration
Don't need to reinvent the wheel.
2017-05-26 20:22:45 +02:00