[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-lisp-state d614275d93 094/125: Fix byte-compilation f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-lisp-state d614275d93 094/125: Fix byte-compilation for defcustom variable |
Date: |
Thu, 6 Jan 2022 04:58:44 -0500 (EST) |
branch: elpa/evil-lisp-state
commit d614275d93416d6f55e72b3c33cc710810aced13
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>
Fix byte-compilation for defcustom variable
---
README.md | 3 +++
evil-lisp-state.el | 38 ++++++++++++++++++++++----------------
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index eef8a04f3a..a3f10b172a 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,9 @@ whose value is determined by the custom variable
For instance, `sp-forward-slurp-sexp` is performed with `s` and the backward
version `sp-backward-slurp-sexp` with `<tab>s`.
+**Note:** The variable `evil-lisp-state-backward-prefix` must be set before
+requiring `evil-lisp-state`.
+
## Philosophy
`evil-lisp-state` goal is to replace the `normal state` in lisp buffers so
diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index f45cfd055a..c8a8eb159c 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -5,7 +5,7 @@
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; Keywords: convenience editing evil smartparens lisp mnemonic
;; Created: 9 Oct 2014
-;; Version: 4.2.2
+;; Version: 4.2.3
;; Package-Requires: ((evil "1.0.9") (smartparens "1.6.1"))
;; URL: https://github.com/syl20bnr/evil-lisp-state
@@ -56,6 +56,13 @@
;; - `J` go to next sexp one level down
;; - `K` go to previous one level up
+;; Configuration:
+;; --------------
+
+;; Backward prefix can be changed by setting the variable
+;; `evil-lisp-state-backward-prefix'
+;; It must be set before requiring evil-lisp-state.
+
;; Example Configuration:
;; ----------------------
@@ -86,11 +93,11 @@
:group 'emulations
:prefix 'evil-lisp-state-)
-;;;###autoload
-(defcustom evil-lisp-state-backward-prefix "<tab>"
- "Prefix to execute the backward version of a command"
- :type 'string
- :group 'evil-lisp-state)
+(eval-and-compile
+ (defcustom evil-lisp-state-backward-prefix "<tab>"
+ "Prefix to execute the backward version of a command"
+ :type 'string
+ :group 'evil-lisp-state))
(defmacro evil-lisp-state-define-key (key command &optional backward)
"Define a key binding for KEY and COMMAND.
@@ -98,17 +105,16 @@
If BACKWARD is not nil then a binding is also created for backward version
of COMMAND.
The backward binding is prepended with `evil-lisp-state-backward-prefix'"
- (let ((backward-prefix evil-lisp-state-backward-prefix))
`(let* ((cmdstr ,(symbol-name command))
- (cmdsym (intern (format "sp-%s" cmdstr))))
- (define-key evil-lisp-state-map ,key cmdsym)
- (if ,backward
- (let* ((bcmdstr (if (string-match "forward" cmdstr)
- (replace-regexp-in-string "forward" "backward"
cmdstr)
- (concat "backward-" cmdstr)))
- (bcmdsym (intern (format "sp-%s" bcmdstr)))
- (bkey ,(concat backward-prefix key)))
- (define-key evil-lisp-state-map (kbd bkey) bcmdsym))))))
+ (cmdsym (intern (format "sp-%s" cmdstr))))
+ (define-key evil-lisp-state-map ,key cmdsym)
+ (if ,backward
+ (let* ((bcmdstr (if (string-match "forward" cmdstr)
+ (replace-regexp-in-string "forward" "backward"
cmdstr)
+ (concat "backward-" cmdstr)))
+ (bcmdsym (intern (format "sp-%s" bcmdstr)))
+ (bkey ,(concat evil-lisp-state-backward-prefix key)))
+ (define-key evil-lisp-state-map (kbd bkey) bcmdsym)))))
;; regular normal state key bindings
(define-key evil-lisp-state-map "1" 'digit-argument)
- [nongnu] elpa/evil-lisp-state 9d07f9efad 116/125: Reapply fix of confusion message when toggling state, (continued)
- [nongnu] elpa/evil-lisp-state 9d07f9efad 116/125: Reapply fix of confusion message when toggling state, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 12f974b74d 124/125: Allow navigation for braces and brackets with j/k., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state b4c54ee3a0 122/125: Bump version to 8.1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 3c65fecd99 125/125: Bump version to 8.2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 0e7f902c74 029/125: Use directions for delete functions, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 5df70d1088 035/125: Bind sp-foward-symbol to `w`, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 36d945c5db 071/125: Add autoload cookie to required custom variable, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 45bbdfce7f 072/125: Insert sibling before/after bindings on `(` and `)` respectively, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 3953f28dd2 078/125: Keep regular `r` binding for evil-replace, raise an sexp with `R`, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 0fcd49259b 080/125: Reorganize the bindings and align them with the philosophy behind evil-lisp-state, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state d614275d93 094/125: Fix byte-compilation for defcustom variable,
ELPA Syncer <=
- [nongnu] elpa/evil-lisp-state 2eb0011287 105/125: Update README to version 7, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state dbb3870e2b 104/125: Version 7, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 5aea6675bb 114/125: evil-lisp-state-leader is now a function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state e5792ec68a 109/125: Add key bindings for navigation, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 16c01d79b2 123/125: Define evil-lisp-state-major-mode-map, ELPA Syncer, 2022/01/06