 ;; 
 (defun autopair-insert-or-skip-quote ()
   (interactive)
+  (setq autopair-inserted (autopair-calculate-inserted))
   (let* ((syntax-triplet (autopair-syntax-ppss))
          (syntax-info (first syntax-triplet))
          (where-sym (second syntax-triplet))

                     (save-excursion
                       (let ((pos-pair (autopair-up-list syntax-info))
                             (prev-point (point-max))
                             (expected-closing (autopair-find-pair last-input-event)))
                         (condition-case err
                             (progn
                               (while (not (eq prev-point (point)))


(defun autopair-skip-close-maybe ()
  (interactive)
  (setq autopair-inserted (autopair-calculate-inserted))
  (when (autopair-skip-p)
    (setq autopair-action (list 'closing (autopair-find-pair autopair-inserted) (point))))
  (autopair-fallback))
(put 'autopair-skip-close-maybe 'function-documentation
     '(concat "Insert or possibly skip over a closing delimiter.\n\n"
              (autopair-document-bindings)))

(defun autopair-backspace ()
  (interactive)
  (setq autopair-inserted (autopair-calculate-inserted))
  (when (char-before)
    (setq autopair-action (list 'backspace (autopair-find-pair (char-before) 'closing) (point))))
  (autopair-fallback (kbd "DEL")))
(put 'autopair-backspace 'function-documentation
     '(concat "Possibly delete a pair of paired delimiters.\n\n"
