I want this function: assume that I am inside a function, and in line 100, now I want to go to the definition of this function, say 80, and set mark, then go back to 100. So now I have an active region between 80 and 100. I write this function like this:
(defun my-select-fun () (interactive) (setq myline 'line-number-at-pos ) (beginning-of-defun) (set-mark) (goto-line myline) )
But it is not working, and I get an error:
Wrong number of arguments: (1 . 1), 0. Sorry for not be familiar with emacs lisp, could someone help me to implement this simple function? Thank you very much.