 ;;;; Resolving patches
 
 (defmacro el-patch--with-puthash (table kvs &rest body)
-  "Binds each of the KVS (lists whose first element is the key
-and whose second element is the value) in the hash TABLE,
-evaluates BODY, then restores the original state of TABLE. Return
-value is the result of evaluating the last form in BODY."
+  "Bind variables in hash TABLE according to KVS then eval BODY.
+Each of the KVS is a list whose first element is the key and
+whose second element is the value. After BODY is evaluated, the
+original state of TABLE is restored. Return value is the result
+of evaluating the last form in BODY."
   (declare (indent 2))
   `(let* ((table ,table)
           (kvs ,kvs)

          (pcase this-directive
            ((quote el-patch-add)
             (when (<= (length form) 1)
               (error "not enough arguments (%d) for `%s'"
                      (1- (length form)) directive))
             (when this-new
               (cl-mapcan resolve (cdr form))))
            ((quote el-patch-swap)
             (cond
              ((<= (length form) 2)
               (error "not enough arguments (%d) for `el-patch-swap'"
                      (1- (length form))))
              ((>= (length form) 4)
               (error "too many arguments (%d) in for `el-patch-swap'"
                      (1- (length form)))))
             (funcall resolve
                      (if this-new


;;;###autoload
(defun el-patch-unpatch (function-name)
  "Remove the patch for FUNCTION-NAME.
This restores the original functionality of FUNCTION-NAME."
  (interactive (list (cadr (el-patch--select-patch))))
  (let ((advice-name (el-patch--advice-name function-name)))
    (advice-remove function-name advice-name)
