Skip to content

Instantly share code, notes, and snippets.

View Fuco1's full-sized avatar
🕶️
Configuring Emacs

Matus Goljer Fuco1

🕶️
Configuring Emacs
View GitHub Profile
@Fuco1
Fuco1 / key-customize.el
Created April 6, 2013 20:10
key-customize
(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.
@Fuco1
Fuco1 / slice-dash.el
Created February 23, 2013 19:36
-slice for dash
(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
@Fuco1
Fuco1 / config.el
Created January 30, 2013 18:33
Default SP config
;; 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)