Skip to content

Commit

Permalink
Fix SPC h SPC, void smartparens-mode
Browse files Browse the repository at this point in the history
Problem:
With the helm layer, `SPC h SPC` shows:
and: Symbol’s value as variable is void: smartparens-mode

Cause:
The `SPC h SPC` helm buffer generates a section called: Toggles
It checks the status of every toggle mode.

But smartparens-mode has the define-minor-mode :init-value nil

Solution:
Check that the two non-global smartparens modes are bound and true:
smartparens-mode
smartparens-strict-mode

Note:
The smartparens global (strict) mode toggles don't need to be checked,
because they enable smartparens-(strict-)mode.
  • Loading branch information
duianto committed Mar 18, 2021
1 parent 369cf75 commit da00174
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layers/+spacemacs/spacemacs-editing/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@
(add-hook 'minibuffer-setup-hook 'spacemacs//conditionally-enable-smartparens-mode)
;; toggles
(spacemacs|add-toggle smartparens
:status (or smartparens-mode smartparens-strict-mode)
:status (or (bound-and-true-p smartparens-mode)
(bound-and-true-p smartparens-strict-mode))
:on (spacemacs//activate-smartparens)
:off (spacemacs//deactivate-smartparens)
:documentation "Enable smartparens."
Expand Down

0 comments on commit da00174

Please sign in to comment.