I am trying to define this seemingly innocuous function:
(defun previous-window ()
(define-key evil-window-map (kbd "o") 'previous-window)
and I am running into this problem:
Debugger entered--Lisp error: (wrong-number-of-arguments (lambda nil (interactive) (other-window -1)) 3)
previous-window(#<window 6 on *scratch*> nil nil)
#[(count &optional all-frames) "..."
ad-Advice-other-window(#[(count &optional all-frames) "..."
apply(ad-Advice-other-window #[(count &optional all-frames) "..."
call-interactively(previous-window nil nil)
If I change that
1, everything works fine. The documentation for
other-window is an interactive compiled Lisp function in `window.el'.
It is bound to C-x o.
(other-window COUNT &optional ALL-FRAMES)
:around advice: `ad-Advice-other-window'
Select another window in cyclic ordering of windows. COUNT specifies the number of windows to skip, starting with the selected window, before making the selection. If COUNT is positive, skip COUNT windows forwards. If COUNT is negative, skip -COUNT windows backwards. COUNT zero means do not skip any window, so select the selected window. In an interactive call, COUNT is the numeric prefix argument. Return nil.
states clearly that negative arguments are used to cycle backwards. Therefore, this is really weird to me. Has it got anything to do with an interactive call? Can someone please explain what is going on here?
I am using
GNU Emacs 24.5.1.