Function: tab-line-select-tab

tab-line-select-tab is an interactive and byte-compiled function defined in tab-line.el.gz.

Signature

(tab-line-select-tab &optional EVENT)

Documentation

Switch to the buffer specified by the tab on which you click.

This command maintains the original order of prev/next buffers. So, for example, switching to a previous tab is equivalent to using the previous-buffer command.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/tab-line.el.gz
(defun tab-line-select-tab (&optional event)
  "Switch to the buffer specified by the tab on which you click.
This command maintains the original order of prev/next buffers.
So, for example, switching to a previous tab is equivalent to
using the `previous-buffer' command."
  (interactive "e")
  (when (tab-line-track-tap event #'tab-line-tab-context-menu)
    (let* ((posnp (tab-line-event-start event))
           (tab (tab-line--get-tab-property 'tab (car (posn-string posnp))))
           (buffer (if (bufferp tab) tab (cdr (assq 'buffer tab)))))
      (if buffer
          (tab-line-select-tab-buffer buffer (posn-window posnp))
        (let ((select (cdr (assq 'select tab))))
          (when (functionp select)
            (with-selected-window (posn-window posnp)
              (funcall select)
              (force-mode-line-update))))))))