Skip to content

Instantly share code, notes, and snippets.

@imakado
Created February 19, 2011 09:20
Show Gist options
  • Save imakado/834958 to your computer and use it in GitHub Desktop.
Save imakado/834958 to your computer and use it in GitHub Desktop.
my "defmethod" yasnippet for cl.
# name : defmethod
# group : defmethod
# contributor : imakado
# --
(defmethod $1 ((${2:this} ${3:`(let ((class-name
(save-excursion
(and (re-search-backward (rx "(" symbol-start "defclass" (+ space)
(group (+ (or (syntax word)
(syntax symbol)))))
nil t)
(match-string-no-properties 1)))))
(or class-name ""))`})$0)
""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment