Reputation: 2828
I'm trying to make a function that moves to the end of line and inserts a newline.
(defun newline-below ()
(interactive)
(move-end-of-line)
(newline)
)
However, I get a cryptic error when I try to run it.
newline-below: Wrong number of arguments: #[(arg) "
Upvotes: 6
Views: 8013
Reputation: 242168
The function move-end-of-line
needs an argument (try C-hf while the cursor is over the function). Just nil
might work for your purpose:
(move-end-of-line nil)
Upvotes: 12