- SPC o r now prompts for a REPL to open when none was found for the
current buffer.
- REPL handlers must now follow the naming convention "*/open*-repl".
e.g. +python/open-ipython-repl, +emacs-lisp/open-repl, etc.
- +eval/open-repl has been split in two:
- +eval/open-repl-other-window
- +eval/open-repl-same-window
Running +eval/region (gr) and +eval/buffer (gR) will use
+emacs-lisp-eval (in emacs-lisp-mode buffers). This change will force it
to emit a backtrace in case of an error.
```
In toplevel form:
../modules/lang/emacs-lisp/autoload.el:71:21:Error: Wrong type argument: listp, "~/.emacs.d/modules/lang/emacs-lisp/autoload"
✕ Failed to compile modules/lang/emacs-lisp/autoload.el
```
This apparently attempts to get compiled multiple times, avoid that by
attempting to compile only if it is not compiled already.
General code and comment improvements.
Also, removed the :desc's for csv-mode because map! is currently unable
to set which-key descriptions mode-locally, and should be avoided for
anything but global keybinds. This will be fixed when General is
introduced into Doom.
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.
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.
+ 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.