Plaster

text
# -*- mode: snippet; require-final-newline: nil -*- # name: slot # key: slot # binding: direct-keybinding # -- (${1:slot-name} :initarg :${2:$1} :accessor ${3:`(enclosing-class-name)`-$1} ${4::initform $5} ${6::type $7} :documentation "$8") (defun enclosing-class-name () "Crude approximation of returning the enclosing class name." (save-excursion (while (progn (beginning-of-line) (not (looking-at "^("))) (previous-line)) (if (looking-at "^(defclass \\(\\(?:\\sw\\|\\s_\\)*\\)") (match-string 1) "")))))