From a10a12c210969eda2cf23e2b5d4a26db16945c00 Mon Sep 17 00:00:00 2001 From: alex-eg Date: Mon, 18 Jan 2021 12:22:47 +0300 Subject: [PATCH] Fix sly common lisp style issues --- emacs/.emacs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/emacs/.emacs b/emacs/.emacs index fa7dbd0..440c0fa 100755 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -12,17 +12,10 @@ :ensure t :custom (inferior-lisp-program "sbcl") - (lisp-indent-function 'common-lisp-indent-function) - :hook (lisp-mode . sly-mode)) -;;; To be able to indent Common Lisp properly, 2 things needed: -;;; 1. connection with Sly should be established -;;; 2. Buffer-local lisp-indent-function variable should be set to Sly- -;;; provided 'common-lisp-indent-function. -(add-hook 'sly-mode-hook - (lambda () - (unless (sly-connected-p) - (save-excursion (sly))) - (setq common-lisp-style "classic"))) + :config (defun set-common-lisp-style () + (setq-local common-lisp-style "classic")) + :hook ((lisp-mode . sly-mode) + (lisp-mode . set-common-lisp-style))) (use-package elisp-mode :custom