Minor refactors & comment revision
This commit is contained in:
parent
0d6c32ff25
commit
4dab595ad3
6 changed files with 20 additions and 24 deletions
23
bin/doom
23
bin/doom
|
@ -6,7 +6,7 @@
|
|||
:; [ "${__DOOMCODE:-0}" -eq 128 ] && { "`$EMACS -Q --batch --eval '(princ temporary-file-directory)'`/doom.sh" "$0" "$@" && true; __DOOMCODE=$?; }
|
||||
:; exit $__DOOMCODE
|
||||
|
||||
;; The garbage collector isn't important during CLI ops. A higher threshold
|
||||
;; The garbage collector isn't as important during CLI ops. A higher threshold
|
||||
;; makes it 15-30% faster, but set it too high and we risk spiralling memory
|
||||
;; usage in longer sessions.
|
||||
(setq gc-cons-threshold 134217728) ; 128mb
|
||||
|
@ -16,8 +16,7 @@
|
|||
(setq load-prefer-newer t)
|
||||
|
||||
;; Ensure Doom runs out of this file's parent directory, where Doom is
|
||||
;; presumably installed. EMACSDIR is set in the shell script preamble earlier in
|
||||
;; this file.
|
||||
;; presumably installed. Use the EMACSDIR envvar to change this.
|
||||
(setq user-emacs-directory
|
||||
(if (getenv "EMACSDIR")
|
||||
(file-name-as-directory (expand-file-name (getenv "EMACSDIR")))
|
||||
|
@ -62,11 +61,9 @@
|
|||
(load (expand-file-name "core/core.el" user-emacs-directory) nil t)
|
||||
(require 'core-cli)
|
||||
|
||||
;; Use our own home-grown debugger to display and log errors + backtraces.
|
||||
;; Control over its formatting is important, because Emacs produces
|
||||
;; difficult-to-read debug information otherwise. By making its errors more
|
||||
;; presentable (and storing them somewhere users can access later) we go a long
|
||||
;; way toward making it easier for users to write better bug reports.
|
||||
;; I use our own home-grown debugger so we can capture and store backtraces,
|
||||
;; make them more presentable, and make it easier for users to produce better
|
||||
;; bug reports!
|
||||
(setq debugger #'doom-cli--debugger
|
||||
debug-on-error t
|
||||
debug-ignored-errors nil)
|
||||
|
@ -83,12 +80,12 @@
|
|||
;; return a boolean, integer (error code) or throw an 'exit event, which
|
||||
;; we handle specially.
|
||||
(apply #'doom-cli-execute :doom (cdr (member "--" argv))))
|
||||
;; Any non-zero integer is treated as an error code.
|
||||
;; Any non-zero integer is treated as an explicit exit code.
|
||||
((and (pred integerp) code) code)
|
||||
;; If, instead, we were given a list or string, copy these as shell script
|
||||
;; commands to a temp script file which this script will execute after this
|
||||
;; session finishes. Also accepts special keywords, like `:restart', to rerun
|
||||
;; the current command.
|
||||
;; If, instead, we were given a string or list of strings, copy these as
|
||||
;; shell script commands to a temporary script file which this script will
|
||||
;; execute after this session finishes. Also accepts special keywords, like
|
||||
;; `:restart', to rerun the current command.
|
||||
((and (or (pred consp)
|
||||
(pred stringp)
|
||||
(pred keywordp))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue