@@ -3911,7 +3911,7 @@ TOP RIGHT BOTTOM) as returned by `window-edges'."
3911
3911
(setq frame (window-normalize-frame frame))
3912
3912
(window--subtree (frame-root-window frame) t))
3913
3913
3914
- (defun other-window (count &optional all-frames)
3914
+ (defun other-window (count &optional all-frames interactive )
3915
3915
"Select another window in cyclic ordering of windows.
3916
3916
COUNT specifies the number of windows to skip, starting with the
3917
3917
selected window, before making the selection. If COUNT is
@@ -3931,7 +3931,7 @@ This function uses `next-window' for finding the window to
3931
3931
select. The argument ALL-FRAMES has the same meaning as in
3932
3932
`next-window', but the MINIBUF argument of `next-window' is
3933
3933
always effectively nil."
3934
- (interactive "p")
3934
+ (interactive "p\ni\np ")
3935
3935
(let* ((window (selected-window))
3936
3936
(original-window window)
3937
3937
(function (and (not ignore-window-parameters)
@@ -3977,7 +3977,8 @@ always effectively nil."
3977
3977
(setq count (1+ count)))))
3978
3978
3979
3979
(when (and (eq window original-window)
3980
- (called-interactively-p 'interactive))
3980
+ interactive
3981
+ (not (or executing-kbd-macro noninteractive)))
3981
3982
(message "No other window to select"))
3982
3983
3983
3984
(select-window window)
@@ -4192,7 +4193,7 @@ that is its frame's root window."
4192
4193
;; Always return nil.
4193
4194
nil))))
4194
4195
4195
- (defun delete-other-windows (&optional window)
4196
+ (defun delete-other-windows (&optional window interactive )
4196
4197
"Make WINDOW fill its frame.
4197
4198
WINDOW must be a valid window and defaults to the selected one.
4198
4199
Return nil.
@@ -4209,7 +4210,7 @@ with the root of the atomic window as its argument. Signal an
4209
4210
error if that root window is the root window of WINDOW's frame.
4210
4211
Also signal an error if WINDOW is a side window. Do not delete
4211
4212
any window whose `no-delete-other-windows' parameter is non-nil."
4212
- (interactive)
4213
+ (interactive "i\np" )
4213
4214
(setq window (window-normalize-window window))
4214
4215
(let* ((frame (window-frame window))
4215
4216
(function (window-parameter window 'delete-other-windows))
@@ -4275,7 +4276,8 @@ any window whose `no-delete-other-windows' parameter is non-nil."
4275
4276
(if (eq window main)
4276
4277
;; Give a message to the user if this has been called as a
4277
4278
;; command.
4278
- (when (called-interactively-p 'interactive)
4279
+ (when (and interactive
4280
+ (not (or executing-kbd-macro noninteractive)))
4279
4281
(message "No other windows to delete"))
4280
4282
(delete-other-windows-internal window main)
4281
4283
(window--check frame))
@@ -4838,11 +4840,11 @@ displayed there."
4838
4840
(interactive)
4839
4841
(switch-to-buffer (last-buffer)))
4840
4842
4841
- (defun next-buffer (&optional arg)
4843
+ (defun next-buffer (&optional arg interactive )
4842
4844
"In selected window switch to ARGth next buffer.
4843
4845
Call `switch-to-next-buffer' unless the selected window is the
4844
4846
minibuffer window or is dedicated to its buffer."
4845
- (interactive "p")
4847
+ (interactive "p\np ")
4846
4848
(cond
4847
4849
((window-minibuffer-p)
4848
4850
(user-error "Cannot switch buffers in minibuffer window"))
@@ -4851,14 +4853,15 @@ minibuffer window or is dedicated to its buffer."
4851
4853
(t
4852
4854
(dotimes (_ (or arg 1))
4853
4855
(when (and (not (switch-to-next-buffer))
4854
- (called-interactively-p 'interactive))
4856
+ interactive
4857
+ (not (or executing-kbd-macro noninteractive)))
4855
4858
(user-error "No next buffer"))))))
4856
4859
4857
- (defun previous-buffer (&optional arg)
4860
+ (defun previous-buffer (&optional arg interactive )
4858
4861
"In selected window switch to ARGth previous buffer.
4859
4862
Call `switch-to-prev-buffer' unless the selected window is the
4860
4863
minibuffer window or is dedicated to its buffer."
4861
- (interactive "p")
4864
+ (interactive "p\np ")
4862
4865
(cond
4863
4866
((window-minibuffer-p)
4864
4867
(user-error "Cannot switch buffers in minibuffer window"))
@@ -4867,7 +4870,8 @@ minibuffer window or is dedicated to its buffer."
4867
4870
(t
4868
4871
(dotimes (_ (or arg 1))
4869
4872
(when (and (not (switch-to-prev-buffer))
4870
- (called-interactively-p 'interactive))
4873
+ interactive
4874
+ (not (or executing-kbd-macro noninteractive)))
4871
4875
(user-error "No previous buffer"))))))
4872
4876
4873
4877
(defun delete-windows-on (&optional buffer-or-name frame)
0 commit comments