From 19cd9ad9e0c8bcfedb7e1099e574b6fd09f28a1b Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Mon, 17 Jun 2024 08:52:24 +0200 Subject: [PATCH] Improve "lst:setup-oglot" in case `oglot' is not installed --- README.org | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index b0486db..110b1d9 100644 --- a/README.org +++ b/README.org @@ -3943,11 +3943,10 @@ configuration: #+caption: Setup ~oglot~ for ~python-mode~. #+name: lst:setup-oglot #+begin_src emacs-lisp -n :results silent -;; GAV: Is always OK after the second evaluation of the form below. -(if (and (package-installed-p 'oglot) - (require 'oglot nil 'noerror)) - (setopt oglot-maybe-ensure-modes '(python-mode)) +(unless (package-installed-p 'oglot) (package-vc-install '(oglot :url "https://github.com/gav451/oglot.git"))) +(when (require 'oglot nil 'noerror) + (setopt oglot-maybe-ensure-modes '(python-mode))) #+end_src #+caption[Start =eglot= in case of a proper =dir-local-variables-alist=]: