From 61c8adb649e2931979d148cd9629116e2d0c8ee2 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 28 May 2021 17:47:19 +0000 Subject: [PATCH] allow editor to be nil --- src/os-utils.lisp | 4 +++- src/software-configuration.lisp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/os-utils.lisp b/src/os-utils.lisp index d18c616..777c1f0 100644 --- a/src/os-utils.lisp +++ b/src/os-utils.lisp @@ -63,7 +63,9 @@ (let ((error-message (_ "No editor found, please configure the 'editor' directive in your configuration file")) (editor (or (swconf:external-editor) - (getenv "EDITOR")))) + (getenv "VISUAL") + (getenv "EDITOR") + "ed"))) (if (null editor) (error error-message) (let ((space (cl-ppcre:scan "\\s" editor))) diff --git a/src/software-configuration.lisp b/src/software-configuration.lisp index 2e6b21f..9c4132d 100644 --- a/src/software-configuration.lisp +++ b/src/software-configuration.lisp @@ -757,8 +757,8 @@ 4)) (defun external-editor () - (access-non-null-conf-value *software-configuration* - +key-editor+)) + (access:access *software-configuration* + +key-editor+)) (defun color-regexps () (access:accesses *software-configuration*