dev: updating from latest pr7002
This commit is contained in:
commit
441792f601
8 changed files with 47 additions and 40 deletions
|
@ -27,16 +27,17 @@
|
|||
;;; Code:
|
||||
|
||||
;; PERF: Garbage collection is a big contributor to startup times. This fends it
|
||||
;; off, but will be reset later by `gcmh-mode'. Not resetting it later will
|
||||
;; cause stuttering/freezes.
|
||||
;; off, but will be reset later by `gcmh-mode' (or in doom-cli.el, if in a
|
||||
;; noninteractive session). Not resetting it later causes stuttering/freezes.
|
||||
(setq gc-cons-threshold most-positive-fixnum)
|
||||
|
||||
;; PERF: Don't use precious startup time checking mtime on elisp bytecode.
|
||||
;; Ensuring correctness is 'doom sync's job, not the interactive session's.
|
||||
;; Still, stale byte-code will cause *heavy* losses in startup efficiency.
|
||||
;; Still, stale byte-code will cause *heavy* losses in startup efficiency, but
|
||||
;; performance is unimportant when Emacs is in an error state.
|
||||
(setq load-prefer-newer noninteractive)
|
||||
|
||||
;; UX: Respect DEBUG envvar as an alternative to --debug-init, and to make are
|
||||
;; UX: Respect DEBUG envvar as an alternative to --debug-init, and to make
|
||||
;; startup sufficiently verbose from this point on.
|
||||
(when (getenv-internal "DEBUG")
|
||||
(setq init-file-debug t
|
||||
|
@ -48,17 +49,17 @@
|
|||
|
||||
(or
|
||||
;; PERF: `file-name-handler-alist' is consulted often. Unsetting it offers a
|
||||
;; notable saving in startup time. This let-binding is just a stopgap though,
|
||||
;; a more complete version of this optimization can be found in lisp/doom.el.
|
||||
;; notable saving in startup time. This is just a stopgap though; this
|
||||
;; optimization is continued more comprehensively in lisp/doom.el.
|
||||
(let (file-name-handler-alist)
|
||||
(let* (;; FIX: Unset `command-line-args' in noninteractive sessions, to
|
||||
;; ensure upstream switches aren't misinterpreted.
|
||||
(command-line-args (unless noninteractive command-line-args))
|
||||
;; I avoid using `command-switch-alist' to process --profile (and
|
||||
;; --init-directory) because it is processed too late to change
|
||||
;; `user-emacs-directory' in time.
|
||||
(profile (or (cadr (member "--profile" command-line-args))
|
||||
(getenv-internal "DOOMPROFILE"))))
|
||||
(let (;; FIX: Unset `command-line-args' in noninteractive sessions, to
|
||||
;; ensure upstream switches aren't misinterpreted.
|
||||
(command-line-args (unless noninteractive command-line-args))
|
||||
;; I avoid using `command-switch-alist' to process --profile (and
|
||||
;; --init-directory) because it is processed too late to change
|
||||
;; `user-emacs-directory' in time.
|
||||
(profile (or (cadr (member "--profile" command-line-args))
|
||||
(getenv-internal "DOOMPROFILE"))))
|
||||
(if (null profile)
|
||||
;; REVIEW: Backported from Emacs 29. Remove when 28 support is dropped.
|
||||
(let ((init-dir (or (cadr (member "--init-directory" command-line-args))
|
||||
|
@ -84,7 +85,10 @@
|
|||
(or (load (expand-file-name
|
||||
(format (let ((lfile (getenv-internal "DOOMPROFILELOADFILE")))
|
||||
(if lfile
|
||||
(concat (string-remove-suffix ".el" lfile)
|
||||
(concat (let ((suffix ".el"))
|
||||
(if (string-suffix-p suffix lfile)
|
||||
(substring lfile 0 (- (length lfile) (length suffix)))
|
||||
lfile))
|
||||
".%d.elc")
|
||||
"profiles/load.%d.elc"))
|
||||
emacs-major-version)
|
||||
|
@ -94,13 +98,13 @@
|
|||
|
||||
;; PERF: When `load'ing or `require'ing files, each permutation of
|
||||
;; `load-suffixes' and `load-file-rep-suffixes' (then `load-suffixes' +
|
||||
;; `load-file-rep-suffixes') is used to locate the file. Each permutation
|
||||
;; is a file op, which is normally very fast, but they can add up over the
|
||||
;; hundreds/thousands of files Emacs needs to load.
|
||||
;; `load-file-rep-suffixes') is used to locate the file. Each permutation
|
||||
;; amounts to at least one file op, which is normally very fast, but can
|
||||
;; add up over the hundreds/thousands of files Emacs loads.
|
||||
;;
|
||||
;; To reduce that burden -- and since Doom doesn't load any dynamic modules
|
||||
;; -- I remove `.so' from `load-suffixes' and pass the `must-suffix' arg to
|
||||
;; `load'. See the docs of `load' for details.
|
||||
;; this early -- I remove `.so' from `load-suffixes' and pass the
|
||||
;; `must-suffix' arg to `load'. See the docs of `load' for details.
|
||||
(if (let ((load-suffixes '(".elc" ".el")))
|
||||
;; I avoid `load's NOERROR argument because other, legitimate errors
|
||||
;; (like permission or IO errors) should not be suppressed or
|
||||
|
@ -112,15 +116,15 @@
|
|||
;; Failing that, assume that we're loading a non-Doom config.
|
||||
(file-missing
|
||||
;; HACK: `startup--load-user-init-file' resolves $EMACSDIR from a
|
||||
;; lexically bound `startup-init-directory', which means changes
|
||||
;; to `user-emacs-directory' won't be respected when loading
|
||||
;; $EMACSDIR/init.el, so I force it to:
|
||||
;; lexical (and so, not-trivially-modifiable)
|
||||
;; `startup-init-directory', so Emacs will fail to locate the
|
||||
;; correct $EMACSDIR/init.el without help.
|
||||
(define-advice startup--load-user-init-file (:filter-args (args) reroute-to-profile)
|
||||
(list (lambda () (expand-file-name "init.el" user-emacs-directory))
|
||||
nil (nth 2 args)))
|
||||
;; Set `user-init-file' for the `load' call further below, and do so
|
||||
;; here while our `file-name-handler-alist' optimization is still
|
||||
;; effective (benefits `expand-file-name'). BTW: Emacs resets
|
||||
;; (Re)set `user-init-file' for the `load' call further below, and
|
||||
;; do so here while our `file-name-handler-alist' optimization is
|
||||
;; still effective (benefits `expand-file-name'). BTW: Emacs resets
|
||||
;; `user-init-file' and `early-init-file' after this file is loaded.
|
||||
(setq user-init-file (expand-file-name "early-init" user-emacs-directory))
|
||||
;; COMPAT: I make no assumptions about the config we're going to
|
||||
|
@ -133,7 +137,7 @@
|
|||
;; as a best fit guess. It's better than Emacs' 80kb default.
|
||||
(setq gc-cons-threshold (* 16 1024 1024))
|
||||
nil)))
|
||||
;; ...But if Doom loaded then continue as normal.
|
||||
;; ...Otherwise, we're loading a Doom config, so continue as normal.
|
||||
(doom-require (if noninteractive 'doom-cli 'doom-start))))
|
||||
|
||||
;; Then continue on to the config/profile we want to load.
|
||||
|
|
|
@ -279,7 +279,7 @@ configdepth. See `doom-module-set' for details."
|
|||
(append (seq-remove #'cdr (doom-module-list nil initorder?))
|
||||
(doom-files-in (if (listp paths-or-all)
|
||||
paths-or-all
|
||||
doom-modules-load-path)
|
||||
doom-module-load-path)
|
||||
:map #'doom-module-from-path
|
||||
:type 'dirs
|
||||
:mindepth 1
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
:pin "b3760f5829dba37e855add7323304561eb57a3d4")
|
||||
|
||||
;; doom-ui.el
|
||||
(package! all-the-icons :pin "ee414384938ccf2ce93c77d717b85dc5538a257d")
|
||||
(package! nerd-icons :pin "c6a4acf19454b415cba1c43daf4bfca8fccdd9ba")
|
||||
(package! hide-mode-line :pin "bc5d293576c5e08c29e694078b96a5ed85631942")
|
||||
(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307")
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
(package! smerge-mode :built-in t)
|
||||
|
||||
(package! browse-at-remote :pin "76aa27dfd469fcae75ed7031bb73830831aaccbf")
|
||||
(package! git-commit :pin "54d37dc14c3f715dd0328a70bc65d63c54ee9613")
|
||||
(package! git-commit :pin "b68e0a3c3388af8daac662f25ccfd3e980590e12")
|
||||
(package! git-timemachine
|
||||
;; The original lives on codeberg.org; which has uptime issues.
|
||||
:recipe (:host github :repo "emacsmirror/git-timemachine")
|
||||
:pin "ac933e5cd29583c131401f3bd991d98129c316df")
|
||||
(package! git-modes :pin "4a61a9b86df9c824a99c522f42d55e68faf85f91")
|
||||
(package! git-modes :pin "3cc94974c09c43462dfbfbe20396a414352dbb92")
|
||||
|
|
|
@ -110,12 +110,13 @@
|
|||
:desc "Remove notes" "n" #'sly-remove-notes
|
||||
:desc "Compile region" "r" #'sly-compile-region)
|
||||
(:prefix ("e" . "evaluate")
|
||||
:desc "Evaluate buffer" "b" #'sly-eval-buffer
|
||||
:desc "Evaluate last" "e" #'sly-eval-last-expression
|
||||
:desc "Evaluate/print last" "E" #'sly-eval-print-last-expression
|
||||
:desc "Evaluate defun" "f" #'sly-eval-defun
|
||||
:desc "Undefine function" "F" #'sly-undefine-function
|
||||
:desc "Evaluate region" "r" #'sly-eval-region)
|
||||
:desc "Evaluate buffer" "b" #'sly-eval-buffer
|
||||
:desc "Evaluate defun" "d" #'sly-overlay-eval-defun
|
||||
:desc "Evaluate last" "e" #'sly-eval-last-expression
|
||||
:desc "Evaluate/print last" "E" #'sly-eval-print-last-expression
|
||||
:desc "Evaluate defun (async)" "f" #'sly-eval-defun
|
||||
:desc "Undefine function" "F" #'sly-undefine-function
|
||||
:desc "Evaluate region" "r" #'sly-eval-region)
|
||||
(:prefix ("g" . "goto")
|
||||
:desc "Go back" "b" #'sly-pop-find-definition-stack
|
||||
:desc "Go to" "d" #'sly-edit-definition
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
(when (package! sly :pin "ed17d2c2bd7aead0fbb09c3d22861c80a522a097")
|
||||
(package! sly-asdf :pin "6f9d751469bb82530db1673c22e7437ca6c95f45")
|
||||
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
|
||||
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048"))
|
||||
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048")
|
||||
(package! sly-overlay :pin "916b50297a1f3bb110f840b89b8717d194623e5f"))
|
||||
|
|
|
@ -228,6 +228,8 @@ See `+emacs-lisp-non-package-mode' for details.")
|
|||
;; expensive functionality, this will often introduce unexpected freezes
|
||||
;; without this advice.
|
||||
;; TODO: PR upstream?
|
||||
(defvar org-inhibit-startup)
|
||||
(defvar org-mode-hook)
|
||||
(defadvice! +emacs-lisp--optimize-org-init-a (fn &rest args)
|
||||
"Disable unrelated functionality to optimize calls to `org-mode'."
|
||||
:around #'elisp-demos--export-json-file
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/magit/packages.el
|
||||
|
||||
(when (package! magit :pin "54d37dc14c3f715dd0328a70bc65d63c54ee9613")
|
||||
(when (package! magit :pin "b68e0a3c3388af8daac662f25ccfd3e980590e12")
|
||||
(when (modulep! +forge)
|
||||
(package! forge :pin "b16b6ec4f7612f5a8fc6d50133cc6189f062c183")
|
||||
(package! forge :pin "3fc6c362b0162082317c128c9c3226529f6965ae")
|
||||
(package! code-review
|
||||
:recipe (:host github
|
||||
:repo "doomelpa/code-review"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue