diff options
| author | Robert Cochran | 2019-12-11 10:04:06 -0800 |
|---|---|---|
| committer | Juri Linkov | 2019-12-16 00:55:47 +0200 |
| commit | c46a4931b1a127f0b1a040a4a48174d4dbca8d16 (patch) | |
| tree | c542fca497817f963f03f933d81db45767fbcf34 | |
| parent | 9b7f0de639e024dd7e546d6cd3148deb1067bd1b (diff) | |
| download | emacs-c46a4931b1a127f0b1a040a4a48174d4dbca8d16.tar.gz emacs-c46a4931b1a127f0b1a040a4a48174d4dbca8d16.zip | |
Document variables that affect tabs in function docstrings
* lisp/tab-bar.el (tab-bar-new-tab-to): Mention
tab-bar-post-open-functions in docstring.
(tab-bar-close-tab): Mention tab-bar-prevent-tab-functions,
tab-bar-tab-pre-close-functions, and tab-bar-close-last-tab-choice.
| -rw-r--r-- | lisp/tab-bar.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index ba4bc0afcda..7e8f56de2a7 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el | |||
| @@ -704,7 +704,10 @@ called." | |||
| 704 | (defun tab-bar-new-tab-to (&optional to-index) | 704 | (defun tab-bar-new-tab-to (&optional to-index) |
| 705 | "Add a new tab at the absolute position TO-INDEX. | 705 | "Add a new tab at the absolute position TO-INDEX. |
| 706 | TO-INDEX counts from 1. If no TO-INDEX is specified, then add | 706 | TO-INDEX counts from 1. If no TO-INDEX is specified, then add |
| 707 | a new tab at the position specified by `tab-bar-new-tab-to'." | 707 | a new tab at the position specified by `tab-bar-new-tab-to'. |
| 708 | |||
| 709 | After the tab is created, the hooks in | ||
| 710 | `tab-bar-tab-post-open-functions' are run." | ||
| 708 | (interactive "P") | 711 | (interactive "P") |
| 709 | (let* ((tabs (funcall tab-bar-tabs-function)) | 712 | (let* ((tabs (funcall tab-bar-tabs-function)) |
| 710 | (from-index (tab-bar--current-tab-index tabs)) | 713 | (from-index (tab-bar--current-tab-index tabs)) |
| @@ -819,7 +822,14 @@ ARG counts from 1. | |||
| 819 | Optional TO-INDEX could be specified to override the value of | 822 | Optional TO-INDEX could be specified to override the value of |
| 820 | `tab-bar-close-tab-select' programmatically with a position | 823 | `tab-bar-close-tab-select' programmatically with a position |
| 821 | of an existing tab to select after closing the current tab. | 824 | of an existing tab to select after closing the current tab. |
| 822 | TO-INDEX counts from 1." | 825 | TO-INDEX counts from 1. |
| 826 | |||
| 827 | The functions in `tab-bar-tab-prevent-close-functions' will be | ||
| 828 | run to determine whether or not to close the tab. | ||
| 829 | Just before the tab is closed, the functions in | ||
| 830 | `tab-bar-tab-pre-close-functions' will be run. The base behavior | ||
| 831 | for the last tab on a frame is determined by | ||
| 832 | `tab-bar-close-last-tab-choice'." | ||
| 823 | (interactive "P") | 833 | (interactive "P") |
| 824 | (let* ((tabs (funcall tab-bar-tabs-function)) | 834 | (let* ((tabs (funcall tab-bar-tabs-function)) |
| 825 | (current-index (tab-bar--current-tab-index tabs)) | 835 | (current-index (tab-bar--current-tab-index tabs)) |