Update edit-function to support cua-mode.