Skip to content

Instantly share code, notes, and snippets.

@hchbaw
Created May 13, 2010 15:44
Show Gist options
  • Save hchbaw/399974 to your computer and use it in GitHub Desktop.
Save hchbaw/399974 to your computer and use it in GitHub Desktop.
(defmacro aif (test-form then-form &optional else-form)
(declare (indent 1))
`(let ((it ,test-form))
(if it ,then-form ,else-form)))
(defmacro aand (&rest args)
(declare (indent 0))
(cond ((null args) t)
((null (cdr args)) (car args))
(t `(aif ,(car args)
(aand ,@(cdr args))))))
(defadvice paredit-space-for-delimiter-p (after ^ activate)
(unless (ad-get-arg 0)
(when ad-return-value
(aand (symbol-at-point)
(eq '^ it)
(setq ad-return-value nil)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment