         (funcall goto-char-fn eoc)))))
 
 (defun doom--surrounded-p ()
-  (and (looking-back "[[{(]\\(\s+\\|\n\\)?\\(\s\\|\t\\)*")
+  (and (looking-back "[[{(]\\(\s+\\|\n\\)?\\(\s\\|\t\\)*" (line-beginning-position))
        (let* ((whitespace (match-string 1))
               (match-str (concat whitespace (match-string 2) "[])}]")))
          (looking-at-p match-str))))

  (if indent-tabs-mode
      (call-interactively 'backward-delete-char)
    (save-excursion
      (unless (looking-back "^[\s\t]*")
        (doom--goto-first-non-blank))
      (let* ((movement (% (current-column) tab-width))
             (spaces (if (= 0 movement) tab-width (- tab-width movement))))

                (setq close-len (- (match-beginning 0) (match-end 0))))
           (string= (plist-get (sp-get-thing t) :op)
                    (plist-get (sp-get-thing) :cl)))
      (delete-char (- 0 open-len))
      (delete-char close-len))
     ;; Delete up to the nearest tab column IF only whitespace between
     ;; point and bol.
