   (let (fn)
     (save-excursion
       (search-backward-regexp modi/fns-regexp)
-      (setq fn (match-string 2))
+      (setq fn (match-string 1))
       (mark-sexp)
       (narrow-to-region (point) (mark))
       (if (member fn modi/fns-in-edebug)

;; outside a `use-package' wrapper
;; http://emacs.stackexchange.com/q/7643/115

;; Edebug defun
(defvar modi/fns-in-edebug nil
  "List of functions for which `edebug' is instrumented.")

(defvar modi/fns-regexp (concat "(\\s-*"
                                "\\(defun\\|defmacro\\)\\s-+"
                                "\\([a-zA-Z0-9\-/]+\\)\\b")
  "Regexp to find defun or defmacro definition.")

(defun modi/toggle-edebug-defun ()

          (progn
            (setq modi/fns-in-edebug (delete fn modi/fns-in-edebug))
            (eval-region (point) (mark))
            (setq-default eval-expression-print-length 12)
            (setq-default eval-expression-print-level  4)
            (message "Edebug disabled: %s" fn))
        ;; If the function is not being edebugged, instrument it
        (progn
          (add-to-list 'modi/fns-in-edebug fn)
          (setq-default eval-expression-print-length nil)
          (setq-default eval-expression-print-level  nil)
          (edebug-defun)
          (message "Edebug: %s" fn)))
      (widen))))

