Emacs: Set final value for gc-cons-threshold after-init.
This commit is contained in:
parent
72e3a6b0e9
commit
432fb10ecc
|
@ -1,6 +1,6 @@
|
|||
;;; global-variables.el --- Set some global variables. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-12-05T14:20:19+0100>
|
||||
;; Time-stamp: <2020-12-08T15:47:38+0100>
|
||||
|
||||
;;; Commentary:
|
||||
;; * Banish customizations.
|
||||
|
@ -41,9 +41,7 @@
|
|||
(auth-source-gpg-encrypt-to ; Encrypt to these users.
|
||||
(cons (symbol-value 'user-mail-address) '()))
|
||||
(what-cursor-show-names t)
|
||||
(read-process-output-max (* 1024 1024)) ; LSP needs this.
|
||||
(gc-cons-threshold (* 800000 2))) ; LSP needs this.
|
||||
|
||||
(read-process-output-max (* 1024 1024))) ; LSP needs this.
|
||||
:config (progn
|
||||
(defalias 'yes-or-no-p 'y-or-n-p) ; Just type y/n instead of yes/no.
|
||||
(savehist-mode t) ; Save minibuffer history.
|
||||
|
@ -57,7 +55,15 @@
|
|||
"Make changes to the buffer on save.
|
||||
If t, run `whitespace-cleanup', `clang-format-buffer' and so on."
|
||||
:type 'boolean
|
||||
:safe #'booleanp)))
|
||||
:safe #'booleanp)
|
||||
(defun my/set-garbage-collection-threshold ()
|
||||
"Set garbage collection threshold to final value."
|
||||
(let ((multiplier 2))
|
||||
(customize-set-variable
|
||||
'gc-cons-threshold
|
||||
(* (car (get 'gc-cons-threshold 'standard-value))
|
||||
multiplier)))))
|
||||
:hook (after-init . my/set-garbage-collection-threshold))
|
||||
|
||||
(provide 'basics/global-variables)
|
||||
;;; global-variables.el ends here
|
||||
|
|
Loading…
Reference in New Issue
Block a user