Remove superfluous `fboundp' checks from three listings

This commit is contained in:
Gerard Vermeulen 2024-06-15 15:32:39 +02:00
parent fb6889f09d
commit 3bee5ba2a4

View File

@ -1386,17 +1386,13 @@ Listing [[lst:bind-embark-commands][bind =embark= commands]] binds =embark= comm
#+caption: Bind =embark= commands globally.
#+name: lst:bind-embark-commands
#+begin_src emacs-lisp -n :results silent
;; GAV: ~org-mode~ and ~embark~ do not play together nicely.
;; GAV: ~embark~ is a dependency of ~citar-embark~ and ~embark-consult~.
;; GAV: `org-mode' and `embark' do not play together nicely.
;; GAV: `embark' is a dependency of `citar-embark' and `embark-consult'.
(when (ensure-package-installation 'embark-consult)
(when (fboundp 'embark-act)
(keymap-global-set "C-," #'embark-act))
(when (fboundp 'embark-dwim)
(keymap-global-set "C-:" #'embark-dwim))
(when (fboundp 'embark-bindings)
(keymap-global-set "C-h B" #'embark-bindings))
(when (fboundp 'embark-prefix-help-command)
(setq prefix-help-command #'embark-prefix-help-command)))
(keymap-global-set "C-," #'embark-act)
(keymap-global-set "C-:" #'embark-dwim)
(keymap-global-set "C-h B" #'embark-bindings)
(setq prefix-help-command #'embark-prefix-help-command))
#+end_src
** [[info:marginalia#Top][Marginalia (info)]]
@ -1410,8 +1406,7 @@ Listing [[lst:enable-marginalia-mode]] enables =marginalia-mode=.
#+caption: Enable =marginalia-mode=.
#+name: lst:enable-marginalia-mode
#+begin_src emacs-lisp -n :results silent
(when (and (ensure-package-installation 'marginalia)
(fboundp 'marginalia-mode))
(when (ensure-package-installation 'marginalia)
(marginalia-mode +1))
#+end_src
@ -5732,10 +5727,9 @@ formatter for Python]].
#+caption: Configure =electric-operator=.
#+name: lst:configure-electric-operator
#+begin_src emacs-lisp -n :results silent
(when (and (ensure-package-installation 'electric-operator)
(fboundp 'electric-operator-mode))
(dolist (symbol '(c-mode-common-hook python-mode-hook))
(add-hook symbol #'electric-operator-mode)))
(when (ensure-package-installation 'electric-operator)
(add-hook 'c-mode-common-hook #'electric-operator-mode)
(add-hook 'python-mode-hook #'electric-operator-mode))
#+end_src
** [[https://joaotavora.github.io/yasnippet/][Smart snippets]]