python: smartparens: Fix bytecomp warning (#10582)
The byte compiler doesn't know about `smartparens-strict-mode' because smartparens is lazy loaded, so wrap the variable reference in `bound-and-true-p' to silence a warning that appears on Spacemacs startup. To reproduce: 1. Install a fresh Spacemacs from develop branch 2. Use spacemacs-base distribution 3. Select only these configuration layers: spacemacs-editing python 4. Restart Emacs to install packages 5. Restart Emacs again and observe warning: Warning (bytecomp): reference to free variable 'smartparens-strict-mode'
This commit is contained in:
parent
000e5022c9
commit
b3743701db
|
@ -387,7 +387,7 @@ fix this issue."
|
||||||
hy-mode-hook))
|
hy-mode-hook))
|
||||||
(defadvice python-indent-dedent-line-backspace
|
(defadvice python-indent-dedent-line-backspace
|
||||||
(around python/sp-backward-delete-char activate)
|
(around python/sp-backward-delete-char activate)
|
||||||
(let ((pythonp (or (not smartparens-strict-mode)
|
(let ((pythonp (or (not (bound-and-true-p smartparens-strict-mode))
|
||||||
(char-equal (char-before) ?\s))))
|
(char-equal (char-before) ?\s))))
|
||||||
(if pythonp
|
(if pythonp
|
||||||
ad-do-it
|
ad-do-it
|
||||||
|
|
Loading…
Reference in a new issue