(end-of-defun): Restructure so that end-of-defun-function is called