diff options
| author | Stefan Kangas | 2021-11-17 08:20:55 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-11-17 08:20:55 +0100 |
| commit | 249095fd6778b9014ff30381ca562f40107d7be4 (patch) | |
| tree | 0e184628fab6876f9bb4ad903f38d0b370f23959 | |
| parent | 90ac2db9ed9b2bab6f40508f6302996d5b8a725d (diff) | |
| parent | fa0b34b716ba31a6414d12de67c8f30706caad96 (diff) | |
| download | emacs-249095fd6778b9014ff30381ca562f40107d7be4.tar.gz emacs-249095fd6778b9014ff30381ca562f40107d7be4.zip | |
Merge from origin/emacs-28
fa0b34b716 * admin/authors.el (authors-ignored-files): Ignore some NE...
c25be3e7bb * lisp/tab-bar.el (tab-bar-select-tab): Add check for wc-f...
38d905abf9 * lisp/tab-bar.el: Doc fixes for commands bound to modifie...
| -rw-r--r-- | admin/authors.el | 3 | ||||
| -rw-r--r-- | lisp/tab-bar.el | 25 |
2 files changed, 19 insertions, 9 deletions
diff --git a/admin/authors.el b/admin/authors.el index fd46dabaa3a..23990fee708 100644 --- a/admin/authors.el +++ b/admin/authors.el | |||
| @@ -323,7 +323,8 @@ Changes to files matching one of the regexps in this list are not listed.") | |||
| 323 | "NEWS.unicode" "COPYING.DJ" "Makefile.old" "Makefile.am" | 323 | "NEWS.unicode" "COPYING.DJ" "Makefile.old" "Makefile.am" |
| 324 | "NEWS.1" "OOOOONEWS...OONEWS" "OOOONEWS" "etc/NEWS" | 324 | "NEWS.1" "OOOOONEWS...OONEWS" "OOOONEWS" "etc/NEWS" |
| 325 | "NEWS.1-17" "NEWS.18" "NEWS.19" "NEWS.20" "NEWS.21" "NEWS.22" | 325 | "NEWS.1-17" "NEWS.18" "NEWS.19" "NEWS.20" "NEWS.21" "NEWS.22" |
| 326 | "MAINTAINERS" "MH-E-NEWS" | 326 | "NEWS.23" "NEWS.24" "NEWS.25" "NEWS.26" "NEWS.27" "NEWS.28" |
| 327 | "MAINTAINERS" "ERC-NEWS" "MH-E-NEWS" "NXML-NEWS" | ||
| 327 | "install.sh" "install-sh" "missing" "mkinstalldirs" | 328 | "install.sh" "install-sh" "missing" "mkinstalldirs" |
| 328 | "termcap.dat" "termcap.src" "termcap.ucb" "termcap" | 329 | "termcap.dat" "termcap.src" "termcap.ucb" "termcap" |
| 329 | "ChangeLog.nextstep" "Emacs.clr" "spec.txt" | 330 | "ChangeLog.nextstep" "Emacs.clr" "spec.txt" |
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 10f26875db5..871ed1c9817 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el | |||
| @@ -91,9 +91,10 @@ | |||
| 91 | (defcustom tab-bar-select-tab-modifiers '() | 91 | (defcustom tab-bar-select-tab-modifiers '() |
| 92 | "List of modifier keys for selecting tab-bar tabs by their numbers. | 92 | "List of modifier keys for selecting tab-bar tabs by their numbers. |
| 93 | Possible modifier keys are `control', `meta', `shift', `hyper', `super' and | 93 | Possible modifier keys are `control', `meta', `shift', `hyper', `super' and |
| 94 | `alt'. Pressing one of the modifiers in the list and a digit selects | 94 | `alt'. Pressing one of the modifiers in the list and a digit selects the |
| 95 | the tab whose number equals the digit. Negative numbers count from | 95 | tab whose number equals the digit (see `tab-bar-select-tab'). |
| 96 | the end of the tab bar. The digit 9 selects the last (rightmost) tab. | 96 | The digit 9 selects the last (rightmost) tab (see `tab-last'). |
| 97 | The digit 0 selects the most recently visited tab (see `tab-recent'). | ||
| 97 | For easier selection of tabs by their numbers, consider customizing | 98 | For easier selection of tabs by their numbers, consider customizing |
| 98 | `tab-bar-tab-hints', which will show tab numbers alongside the tab name." | 99 | `tab-bar-tab-hints', which will show tab numbers alongside the tab name." |
| 99 | :type '(set :tag "Tab selection modifier keys" | 100 | :type '(set :tag "Tab selection modifier keys" |
| @@ -1060,11 +1061,14 @@ inherits the current tab's `explicit-name' parameter." | |||
| 1060 | 1061 | ||
| 1061 | (defun tab-bar-select-tab (&optional tab-number) | 1062 | (defun tab-bar-select-tab (&optional tab-number) |
| 1062 | "Switch to the tab by its absolute position TAB-NUMBER in the tab bar. | 1063 | "Switch to the tab by its absolute position TAB-NUMBER in the tab bar. |
| 1063 | When this command is bound to a numeric key (with a prefix or modifier key | 1064 | When this command is bound to a numeric key (with a key prefix or modifier key |
| 1064 | using `tab-bar-select-tab-modifiers'), calling it without an argument | 1065 | using `tab-bar-select-tab-modifiers'), calling it without an argument |
| 1065 | will translate its bound numeric key to the numeric argument. | 1066 | will translate its bound numeric key to the numeric argument. |
| 1066 | TAB-NUMBER counts from 1. Negative TAB-NUMBER counts tabs from the end of | 1067 | Also the prefix argument TAB-NUMBER can be used to override |
| 1067 | the tab bar." | 1068 | the numeric key, so it takes precedence over the bound digit key. |
| 1069 | For example, `<MODIFIER>-2' will select the second tab, but `C-u 15 | ||
| 1070 | <MODIFIER>-2' will select the 15th tab. TAB-NUMBER counts from 1. | ||
| 1071 | Negative TAB-NUMBER counts tabs from the end of the tab bar." | ||
| 1068 | (interactive "P") | 1072 | (interactive "P") |
| 1069 | (unless (integerp tab-number) | 1073 | (unless (integerp tab-number) |
| 1070 | (let ((key (event-basic-type last-command-event))) | 1074 | (let ((key (event-basic-type last-command-event))) |
| @@ -1092,7 +1096,11 @@ the tab bar." | |||
| 1092 | ;; its value of window-configuration is unreadable, | 1096 | ;; its value of window-configuration is unreadable, |
| 1093 | ;; so restore its saved window-state. | 1097 | ;; so restore its saved window-state. |
| 1094 | (cond | 1098 | (cond |
| 1095 | ((window-configuration-p wc) | 1099 | ((and (window-configuration-p wc) |
| 1100 | ;; Check for such cases as cloning a frame with tabs. | ||
| 1101 | ;; When tabs were cloned to another frame, then fall back | ||
| 1102 | ;; to using `window-state-put' below. | ||
| 1103 | (eq (window-configuration-frame wc) (selected-frame))) | ||
| 1096 | (let ((wc-point (alist-get 'wc-point to-tab)) | 1104 | (let ((wc-point (alist-get 'wc-point to-tab)) |
| 1097 | (wc-bl (seq-filter #'buffer-live-p (alist-get 'wc-bl to-tab))) | 1105 | (wc-bl (seq-filter #'buffer-live-p (alist-get 'wc-bl to-tab))) |
| 1098 | (wc-bbl (seq-filter #'buffer-live-p (alist-get 'wc-bbl to-tab))) | 1106 | (wc-bbl (seq-filter #'buffer-live-p (alist-get 'wc-bbl to-tab))) |
| @@ -1161,7 +1169,8 @@ Interactively, ARG is the prefix numeric argument and defaults to 1." | |||
| 1161 | (defun tab-bar-switch-to-last-tab (&optional arg) | 1169 | (defun tab-bar-switch-to-last-tab (&optional arg) |
| 1162 | "Switch to the last tab or ARGth tab from the end of the tab bar. | 1170 | "Switch to the last tab or ARGth tab from the end of the tab bar. |
| 1163 | Interactively, ARG is the prefix numeric argument; it defaults to 1, | 1171 | Interactively, ARG is the prefix numeric argument; it defaults to 1, |
| 1164 | which means the last tab on the tab bar." | 1172 | which means the last tab on the tab bar. For example, `C-u 2 |
| 1173 | <MODIFIER>-9' selects the tab before the last tab." | ||
| 1165 | (interactive "p") | 1174 | (interactive "p") |
| 1166 | (tab-bar-select-tab (- (length (funcall tab-bar-tabs-function)) | 1175 | (tab-bar-select-tab (- (length (funcall tab-bar-tabs-function)) |
| 1167 | (1- (or arg 1))))) | 1176 | (1- (or arg 1))))) |