This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcustom sp-base-key-bindings nil | |
"A default set of key bindings for commands provided by smartparens. | |
Paredit binding adds the paredit bindings to the corresponding | |
smartparens commands. It does not add bindings to any other | |
commands, or commands that do not have a paredit counterpart. | |
Smartparens binding adds bindings to most common smartparens | |
commands. These are somewhat inspired by paredit, but in many | |
cases differ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun -slice (list &optional from to) | |
"Return copy of LIST, starting from index FROM to index TO. | |
FROM or TO may be negative" | |
(setq from (or from 0)) | |
(setq to (or to 0)) | |
(let ((from-list list) | |
(result-list nil) | |
(index 0) | |
(len 0)) | |
(cond |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; predicates... I'm not sure yet how to call it. I don't want the | |
;; -p suffix, because that's used internally and there migth be | |
;; some clashes. I think sp-pred- is a good indicator, at least | |
;; for the built-in stuff. | |
(defun sp-pred-in-string (id action context) | |
"Return t if point is inside string or comment, nil otherwise." | |
(eq context :string)) | |
(defun sp-pred-in-code (id action context) |
NewerOlder