defun query-replace-from-top using M-%