Skip to content

Instantly share code, notes, and snippets.

@tomjack
Created October 5, 2010 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomjack/d3efe42b44bb0385c69f to your computer and use it in GitHub Desktop.
Save tomjack/d3efe42b44bb0385c69f to your computer and use it in GitHub Desktop.
;; often I'll write something like :
|(if (> x 3)
(assoc foo :bar x)
(assoc foo :bar 0))
;; with point on the open paren for the if:
;; C-M-f C-M-p C-M-p C-M-b M-r C-M-p C-M-b C-c C-f
;; (note: I have C-c C-f bound to paredit-convolute-sexp)
|(assoc foo :bar (if (> x 3)
x
0))
;; if I realize I need to make this change after only writing
(if (> x 3)
(assoc foo :bar |))
;; with point after :bar
;; C-c C-f C-M-f C-M-p C-M-p
(assoc foo :bar (if (> x 3)
|))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment