From 3bee5ba2a4ddc1b1a1c644397da074af0fc82f3a Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sat, 15 Jun 2024 15:32:39 +0200 Subject: [PATCH] Remove superfluous `fboundp' checks from three listings --- README.org | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/README.org b/README.org index 379aaa9..8b007e2 100644 --- a/README.org +++ b/README.org @@ -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]]