Replace twice "when require" with "with-eval-after-load"

This commit is contained in:
Gerard Vermeulen 2024-06-12 09:17:05 +02:00
parent cc6198d1fe
commit 33e4d5ca3b

View File

@ -941,7 +941,7 @@ minibuffer completion]].
#+caption: Set =minibuffer= options.
#+name: lst:set-minibuffer-options
#+begin_src emacs-lisp -n :results silent
(when (require 'minibuffer nil 'noerror)
(with-eval-after-load 'minibuffer
;; https://www.masteringemacs.org/article/understanding-minibuffer-completion
(setopt
completion-category-overrides '((file (styles basic substring)))
@ -1367,7 +1367,7 @@ histories.
#+caption: Enable =savehist-mode= and =vertico-mode=.
#+name: lst:enable-vertico-mode
#+begin_src emacs-lisp -n :results silent
(when (require 'savehist nil 'noerror)
(with-eval-after-load 'savehist
(setopt savehist-additional-variables '(kill-ring search-ring))
(savehist-mode +1))
(when (and (ensure-package-installation 'vertico)