mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* lisp/window.el (next-buffer, previous-buffer): Add repeat count arg.
* doc/emacs/buffers.texi (Select Buffer): Mention arg as repeat count. (Bug#37514)
This commit is contained in:
parent
e56c0bba4f
commit
dafd329771
3 changed files with 16 additions and 12 deletions
|
|
@ -127,7 +127,8 @@ Modes}).
|
|||
(@code{previous-buffer}) selects the previous buffer (following the
|
||||
order of most recent selection in the current frame), while @kbd{C-x
|
||||
@key{RIGHT}} (@code{next-buffer}) moves through buffers in the reverse
|
||||
direction.
|
||||
direction. Both commands support a numeric prefix argument that
|
||||
serves as a repeat count.
|
||||
|
||||
@kindex C-x 4 b
|
||||
@findex switch-to-buffer-other-window
|
||||
|
|
|
|||
7
etc/NEWS
7
etc/NEWS
|
|
@ -2115,9 +2115,10 @@ The new command 'global-tab-line-mode' enables the tab line above each
|
|||
window, which you can use to switch buffers in the window. Selecting
|
||||
the previous window-local tab is the same as typing 'C-x <LEFT>'
|
||||
(previous-buffer), selecting the next tab is the same as 'C-x <RIGHT>'
|
||||
(next-buffer). Clicking on the plus icon adds a new buffer to the
|
||||
window-local tab line of buffers. Using the mouse wheel on the
|
||||
tab line scrolls tabs that display the window buffers.
|
||||
(next-buffer). Both commands support a numeric prefix argument as
|
||||
a repeat count. Clicking on the plus icon adds a new buffer to the
|
||||
window-local tab line of buffers. Using the mouse wheel on the tab
|
||||
line scrolls tabs that display the window buffers.
|
||||
|
||||
** fileloop.el lets one setup multifile operations like search&replace.
|
||||
|
||||
|
|
|
|||
|
|
@ -4747,31 +4747,33 @@ displayed there."
|
|||
(interactive)
|
||||
(switch-to-buffer (last-buffer)))
|
||||
|
||||
(defun next-buffer ()
|
||||
"In selected window switch to next buffer.
|
||||
(defun next-buffer (&optional arg)
|
||||
"In selected window switch to ARGth next buffer.
|
||||
Call `switch-to-next-buffer' unless the selected window is the
|
||||
minibuffer window or is dedicated to its buffer."
|
||||
(interactive)
|
||||
(interactive "p")
|
||||
(cond
|
||||
((window-minibuffer-p)
|
||||
(user-error "Cannot switch buffers in minibuffer window"))
|
||||
((eq (window-dedicated-p) t)
|
||||
(user-error "Window is strongly dedicated to its buffer"))
|
||||
(t
|
||||
(switch-to-next-buffer))))
|
||||
(dotimes (_ (or arg 1))
|
||||
(switch-to-next-buffer)))))
|
||||
|
||||
(defun previous-buffer ()
|
||||
"In selected window switch to previous buffer.
|
||||
(defun previous-buffer (&optional arg)
|
||||
"In selected window switch to ARGth previous buffer.
|
||||
Call `switch-to-prev-buffer' unless the selected window is the
|
||||
minibuffer window or is dedicated to its buffer."
|
||||
(interactive)
|
||||
(interactive "p")
|
||||
(cond
|
||||
((window-minibuffer-p)
|
||||
(user-error "Cannot switch buffers in minibuffer window"))
|
||||
((eq (window-dedicated-p) t)
|
||||
(user-error "Window is strongly dedicated to its buffer"))
|
||||
(t
|
||||
(switch-to-prev-buffer))))
|
||||
(dotimes (_ (or arg 1))
|
||||
(switch-to-prev-buffer)))))
|
||||
|
||||
(defun delete-windows-on (&optional buffer-or-name frame)
|
||||
"Delete all windows showing BUFFER-OR-NAME.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue