From 94244302676dd8e9325237b86ae70c84787134e6 Mon Sep 17 00:00:00 2001 From: Eivind Fonn Date: Fri, 16 Jun 2017 09:51:24 +0200 Subject: [PATCH] ess: minor changes - if -> when - make ess-enable-smart-equals a toggle - fill paragraphs in readme --- layers/+lang/ess/README.org | 10 +++++----- layers/+lang/ess/packages.el | 19 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/layers/+lang/ess/README.org b/layers/+lang/ess/README.org index e4d9add1e..b19de0782 100644 --- a/layers/+lang/ess/README.org +++ b/layers/+lang/ess/README.org @@ -52,17 +52,17 @@ Helpers for inspecting objects at point are available in R buffers only. * Options -To turn off the automatic replacement of underscores by =<-=, -set in your =~/.spacemacs=: +To turn off the automatic replacement of underscores by =<-=, set in your +=~/.spacemacs=: #+BEGIN_SRC emacs-lisp (setq-default dotspacemacs-configuration-layers '((ess :variables ess-disable-underscore-assign t))) #+END_SRC -Alternatively you may enable =ess-smart-equals=, which also disables -replacement of underscores by =<-=, and additionally replace the equals sign with -=<-= when appropriate: +Alternatively you may enable =ess-smart-equals=, which also disables replacement +of underscores by =<-=, and additionally replace the equals sign with =<-= when +appropriate: #+BEGIN_SRC emacs-lisp (setq-default dotspacemacs-configuration-layers '((ess :variables diff --git a/layers/+lang/ess/packages.el b/layers/+lang/ess/packages.el index 9486ced9a..fa19fc416 100644 --- a/layers/+lang/ess/packages.el +++ b/layers/+lang/ess/packages.el @@ -10,13 +10,13 @@ ;;; License: GPLv3 (setq ess-packages - '( - ess - ess-R-data-view - ess-R-object-popup - ess-smart-equals - golden-ratio - org)) + '( + ess + ess-R-data-view + ess-R-object-popup + (ess-smart-equals :toggle ess-enable-smart-equals) + golden-ratio + org)) (defun ess/init-ess () (use-package ess-site @@ -61,7 +61,7 @@ (add-hook 'inferior-ess-mode-hook 'spacemacs//ess-fix-read-only-inferior-ess-mode) (when (configuration-layer/package-usedp 'company) - (add-hook 'ess-mode-hook 'company-mode)))) + (add-hook 'ess-mode-hook 'company-mode)))) ;; R -------------------------------------------------------------------------- (with-eval-after-load 'ess-site @@ -71,7 +71,7 @@ ess-expression-offset 2 ess-nuke-trailing-whitespace-p t ess-default-style 'DEFAULT) - (if ess-disable-underscore-assign + (when ess-disable-underscore-assign (ess-toggle-underscore nil)) (spacemacs/set-leader-keys-for-major-mode 'ess-julia-mode @@ -114,7 +114,6 @@ (defun ess/init-ess-smart-equals () (use-package ess-smart-equals :defer t - :if ess-enable-smart-equals :init (progn (add-hook 'ess-mode-hook 'ess-smart-equals-mode)