Simplify customizing of package-selected-packages

This commit is contained in:
Gerard Vermeulen 2022-04-20 04:56:39 +02:00
parent d33a277c07
commit 517e7f8d0a

View File

@ -151,15 +151,17 @@ that *Emacs is a self-documenting editor.*
The =user-init-file= header requires =cl-lib= and customizes Emacs variables.
It consists of three parts in listing [[lst:1st-custom-set-variables-call]],
[[lst:2nd-custom-set-variables-call]], and [[lst:3rd-custom-set-variables-call]] in
order to limit the length of the listings for exporting to LaTeX. The [[info:elisp#Quoting][quoting
(info)]] and the [[info:elisp#Backquote][backquote (info)]] pages explain how to understand the reader
macros ~'~ (quote), ~`~ (backquote), ~,~ (substitute) and ~@,~ (splice) in the
order to limit the length of the listings for exporting to LaTeX.
The [[info:elisp#Quoting][quoting (info)]] and the [[info:elisp#Backquote][backquote (info)]] pages explain how to understand the
~'~ (quote), ~`~ (backquote), ~,~ (substitute) and ~@,~ (splice) in the
~custom-set-variables~ function calls in listing
[[lst:1st-custom-set-variables-call]], [[lst:2nd-custom-set-variables-call]], and
[[lst:3rd-custom-set-variables-call]]. A tutorial of how to use those reader macros
is the [[https://mullikine.github.io/posts/macro-tutorial/][didactic emacs-lisp macro example]]. The [[info:emacs#Init File][init file (info)]] does not load
the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations (info)]] recommends because of the
~custom-set-variables~ function calls.
is the [[https://mullikine.github.io/posts/macro-tutorial/][didactic emacs-lisp macro example]].
The [[info:emacs#Init File][init file (info)]] does not load the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations
(info)]] recommends because of the ~custom-set-variables~ function calls.
#+caption[Customize the first set of Emacs variables]:
#+caption: Customize the first set of Emacs variables.
@ -202,11 +204,8 @@ the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations (
#+name: lst:2nd-custom-set-variables-call
#+begin_src emacs-lisp
(custom-set-variables
`(package-selected-packages
`(,@(when (version< emacs-version "28.0")
'(org ; plain text thought organizer
python)) ; mode to edit Python code
anaconda-mode ; strangles python-mode
'(package-selected-packages
'(anaconda-mode ; strangles python-mode
applescript-mode ; mode to edit AppleScript code
async ; asynchroneous processing
auctex ; Aalborg University Center TeX
@ -233,7 +232,9 @@ the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations (
no-littering ; keep `user-emacs-directory' clean
nov ; EPUB reader
orderless ; Emacs completion style
org ; plain text thought organizer
pdf-tools ; interactive docview replacement
python ; mode to edit Python code
quelpa ; install Emacs packages from source
rainbow-mode ; set background color to color string
saveplace-pdf-view ; save pdf-view and doc-view places