Function: electric-indent--yank-advice
electric-indent--yank-advice is a byte-compiled function defined in
electric.el.gz.
Signature
(electric-indent--yank-advice FN &rest R)
Source Code
;; Defined in /usr/src/emacs/lisp/electric.el.gz
(defun electric-indent--yank-advice (fn &rest r)
(let ((p (point))
(end (line-beginning-position)))
(apply fn r)
(when (and electric-indent-mode
(memq 'yank electric-indent-actions)
(electric-indent-can-reindent-p)
;; Ensure yanked text is longer than 1 line
(> (point) p)
(not (= end (line-beginning-position))))
(undo-boundary)
(save-excursion
(with-demoted-errors "Error reindenting: %S"
(indent-region p (point)))))))