From c3ac03da92d9254de17cd58f019caf2e1ac163c2 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sat, 15 Jun 2024 16:08:37 +0200 Subject: [PATCH] Clean up "lst:setup-company" --- README.org | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.org b/README.org index 8b007e2..5426a07 100644 --- a/README.org +++ b/README.org @@ -1520,19 +1520,17 @@ configures =company= after ensuring the =company= installation. #+caption: Setup =company=. #+name: lst:setup-company #+begin_src emacs-lisp -n :results silent -(when (and (ensure-package-installation 'company) - (fboundp 'company-mode)) +(when (ensure-package-installation 'company) ;; https://github.com/purcell/emacs.d/issues/778 (setopt company-transformers '(company-sort-by-occurrence)) - (dolist (symbol '(LaTeX-mode-hook - org-mode-hook - emacs-lisp-mode-hook - lisp-interaction-mode-hook - lisp-mode-hook - python-mode-hook - ielm-mode-hook - sly-mrepl-mode-hook)) - (add-hook symbol #'company-mode))) + (add-hook 'LaTeX-mode-hook #'company-mode) + (add-hook 'org-mode-hook #'company-mode) + (add-hook 'emacs-lisp-mode-hook #'company-mode) + (add-hook 'lisp-interaction-mode-hook #'company-mode) + (add-hook 'lisp-mode-hook #'company-mode) + (add-hook 'python-mode-hook #'company-mode) + (add-hook 'ielm-mode-hook #'company-mode) + (add-hook 'sly-mrepl-mode-hook #'company-mode)) #+end_src * [[info:emacs#Search][Search and replace (info)]]