Emacs: error of the wrong number of arguments when trying to call my function

I am trying to make a function that moves to the end of a line and inserts a new line.

(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) "
+5
source share
1 answer

The function move-end-of-lineneeds an argument (try C-h fwhen the cursor is over the function). Just nilmight work for your purpose:

(move-end-of-line nil)
+12
source

All Articles