| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the same naming scheme for function arguments. Use the term "index" when
arguments count from 0, and the term "number" when arguments count from 1.
* lisp/tab-bar.el (tab-bar-select-tab): Rename ‘arg’ to ‘tab-number’.
(tab-bar-move-tab-to): Rename ‘from-index’ to ‘from-number’
and ‘to-index’ to ‘to-number’.
(tab-bar-move-tab-to-frame): Rename ‘from-index’ to ‘from-number’
and ‘to-index’ to ‘to-number’.
(tab-bar-new-tab-to): Rename ‘to-index’ to ‘tab-number’.
(tab-bar-close-tab): Rename ‘arg’ to ‘tab-number’
and ‘to-index’ to ‘to-number’.
(tab-bar-rename-tab): Rename ‘arg’ to ‘tab-number’.
(tab-bar-change-tab-group): Rename ‘arg’ to ‘tab-number’.
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-mouse-select-tab): Don't close the tab
when clicked on the close button.
(tab-bar-mouse-close-tab-from-button): New function.
(tab-bar-map): Bind [mouse-1] to 'tab-bar-mouse-close-tab-from-button'.
(tab-bar-mouse-move-tab): Do nothing on non-tab events.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar--key-to-number): Return non-nil non-numeric t
when no tab is used. Return nil for current-tab.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab): Do nothing
when tab-bar--key-to-number returns non-nil non-numeric t
for click events outside of any tab.
(tab-bar-mouse-context-menu): Add context menu when mouse is clicked
outside of tabs. Add "Duplicate" alongside with "Close" to the menu
used when mouse is clicked on a tab.
(toggle-tab-bar-mode-from-frame, toggle-frame-tab-bar): Move code
closer to 'tab-bar-show'.
* src/xdisp.c (handle_tab_bar_click): Return Qtab_bar with empty list
when mouse is clicked on the tab bar but outside of any tab.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-get-buffer-tab): Prefer the current tab
when 'ignore-current-tab' is nil.
(display-buffer-in-tab): Use alist entry 'ignore-current-tab'
as the third arg of 'tab-bar-get-buffer-tab'. Improve docstring.
Suggested by Feng Shu <tumashu@163.com>
https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg00955.html
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-show, toggle-frame-tab-bar): Doc
fixes.
* etc/NEWS: Update the corresponding entries.
|
|
|
|
|
|
|
| |
* etc/NEWS: Improve wording of tab-bar related entries.
* lisp/tab-bar.el (tab-bar-show, tab-bar-select-tab-modifiers):
Improve and clarify the doc strings.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/tab-bar.el (tab-bar--key-to-number): Rename from tab--key-to-number.
(tab-bar--event-to-item): New function from tab-bar-handle-mouse.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab)
(tab-bar-mouse-context-menu, tab-bar-mouse-move-tab):
Use tab-bar--event-to-item.
* src/menu.c (x_popup_menu_1): Handle Qtab_bar in the second list element.
* src/xdisp.c (tty_get_tab_bar_item): Change arg 'end' to bool 'close_p'.
(tty_get_tab_bar_item): Detect if the close button was clicked.
(tty_handle_tab_bar_click): Return a list with caption that has
text properties.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/tab-bar.el (tab-bar-map): Bind mouse-4/wheel-up/wheel-left
to tab-previous and mouse-5/wheel-down/wheel-right to tab-next.
Bind S-mouse-4/wheel-up/wheel-left to tab-bar-move-tab-backward
and S-mouse-5/wheel-down/wheel-right to tab-bar-move-tab.
(tab-bar-move-tab-backward): New command.
(tab-bar-move-repeat-map): Use tab-bar-move-tab-backward
instead of lambda.
* src/xterm.c (handle_one_xevent): Remove restriction
to allow clicking mouse-4 and mouse-5.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/tab-bar.el (tab-bar-mouse-move-tab): New command.
(tab-bar-map): Bind [drag-mouse-1] to tab-bar-mouse-move-tab.
(tab-bar-select-tab): Zero or nil arg means the current tab.
* src/xdisp.c (handle_tab_bar_click): Remove restriction
to allow dragging the tab to another tab.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of emitting menu-item keys like [tab-1],
emit normal mouse events like [mouse-1] and [down-mouse-3]
for all mouse clicks issued on the tab-bar.
* lisp/mouse.el (mouse-posn-property): Handle 'tab-bar' posn-area.
* lisp/tab-bar.el (tab--key-to-number): New internal function.
(tab-bar-handle-mouse): Use tab key to select/close tab.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab)
(tab-bar-mouse-context-menu): New commands.
(tab-bar-map): Bind [down-mouse-1] to tab-bar-mouse-select-tab,
[down-mouse-2] to tab-bar-mouse-close-tab,
[down-mouse-3] to tab-bar-mouse-context-menu.
(tab-bar-keymap-cache): Remove.
(tab-bar-make-keymap): Don't use cache.
(tab-bar--format-tab): Remove default bindings from menu items.
(tab-bar-make-keymap-1): Prepend tab-bar-map.
* src/keyboard.c (make_lispy_event): Append event->arg to position
for Qtab_bar.
* src/term.c (handle_one_term_event): Simplify to set event arg.
* src/w32inevt.c (do_mouse_event): Set emacs_ev->arg to the value
returned from tty_handle_tab_bar_click.
* src/w32term.c (w32_handle_tab_bar_click): Return value from
handle_tab_bar_click.
(w32_read_socket): Set tab_bar_key to value returned from
w32_handle_tab_bar_click, and set event arg from it.
* src/xdisp.c (handle_tab_bar_click): Instead of emitting event,
return a list with Qtab_bar and tab caption with text properties
that contain Qmenu_item with key and binding.
(tty_handle_tab_bar_click): Simplify to return a list of Qtab_bar,
key and close_p, instead of emitting event.
* src/xterm.c (handle_one_xevent): Set tab_bar_key to value
returned from handle_tab_bar_click, and set event arg from it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* src/xterm.c (x_draw_image_relief):
* src/w32term.c (w32_draw_image_relief): Fix calculation of relief
thickness for tab-bar buttons.
* lisp/tab-bar.el (tab-bar--load-buttons)
(tab-bar-history-mode): Fix the :margin specification for tab-bar
buttons. (Bug#50424)
|
|/ |
|
| |
|
|
|
|
|
|
| |
(tab-bar-format-history): Don't use this recently added variable
because now it's possible to customize the option 'tab-bar-format'
to remove 'tab-bar-format-history' from it that gives the same result.
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar--define-keys): Adjust to the new
default value for `mode-line-misc-info'.
|
| |
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar--define-keys): Adjust to the new
default value for `mode-line-misc-info'.
|
| |
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-switch-repeat-map): New keymap used for
'tab-next' and 'tab-previous'.
(tab-bar-move-repeat-map): New keymap used for 'tab-move'.
https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg01103.html
|
|
|
|
|
| |
(tab-bar-change-tab-group): Run it.
(tab-bar-move-tab-to-group): New command for new hook.
|
|
|
|
|
|
|
|
|
|
| |
(tab-bar-tabs, tab-bar-select-tab, tab-bar-new-tab-to):
Use tab-bar--current-tab-make instead of tab-bar--current-tab.
(tab-bar--tab): Add arg 'frame' to tab-bar--current-tab-find.
(tab-bar--current-tab, tab-bar--current-tab-make): Move most of body
from the former to the latter, thus reverting tab-bar--current-tab
to its previous behavior.
https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00959.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-tab-group-current)
(tab-bar-tab-group-inactive, tab-bar-tab-ungrouped): New deffaces.
(tab-bar-tab-face-function): New defcustom.
(tab-bar-tab-face-default): New function.
(tab-bar-tab-name-format-default): Use it.
(tab-bar-tab-group-format-default): Use tab-bar-tab-group-inactive face.
(tab-bar-tab-group-face-function): New defcustom.
(tab-bar-tab-group-face-default): New function.
(tab-bar--format-tab-group): Add new arg 'current-p'.
(tab-bar-format-tabs-groups): Prepend current group name before first tab.
Override tab-bar-tab-face-function with tab-bar-tab-group-face-function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-tabs-set): New function.
(tab-bar-tabs): Use tab-bar--current-tab-find and tab-bar-tabs-set.
(tab-bar--tab): Use tab-bar--current-tab-find.
(tab-bar--current-tab): Remove unused line (assq 'current-tab ...)
because there is no current-tab when it's called. Remove unused arg 'frame'.
(tab-bar--current-tab-find): Simplify.
(tab-bar-move-tab-to, tab-bar-move-tab-to-frame)
(tab-bar-new-tab-to, tab-bar-close-tab)
(tab-bar-close-other-tabs, tab-bar-undo-close-tab)
(tab-switcher-delete-from-list): Use tab-bar-tabs-set
instead of set-frame-parameter.
(tab-bar-close-group-tabs): Simplify using tab-bar--current-tab-find
without arg.
|
|
|
|
| |
(tab-bar--current-tab, tab-bar-new-tab-to, tab-bar-duplicate-tab): Use it.
|
|
|
|
|
|
| |
(tab-bar-tab-group-default): New function.
(tab-bar-tab-group-format-default, tab-bar-format-tabs-groups)
(tab-bar-change-tab-group, tab-bar-close-group-tabs): Use it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-format): Turn defvar into defcustom.
Add :options and force-mode-line-update in :set.
(tab-bar--format-tab): New function refactored from tab-bar-format-tabs.
(tab-bar-format-tabs): Move most of code to tab-bar--format-tab and call it.
(tab-bar-tab-group-format-function): New defcustom.
(tab-bar-tab-group-format-default): New function.
(tab-bar--format-tab-group, tab-bar-format-tabs-groups): New functions.
(tab-bar-format-align-right, tab-bar-format-global): Shorten id.
(tab-bar-change-tab-group): Add refs to tab-bar-format in docstring.
|
|
|
|
|
|
|
| |
(tab-bar-close-other-tabs, tab-bar-close-group-tabs): Use it.
(tab-bar--history-pre-change): Rename from
'tab-bar-history--pre-change' to follow naming convention.
(tab-bar-history-mode): Use renamed 'tab-bar--history-pre-change'.
|
|
|
|
|
|
|
| |
(tab-close-group): New alias.
(tab-bar-close-other-tabs): Rewrite to fix old bug where regardless of
the returned value from tab-bar-tab-prevent-close-functions,
only one tab was retained.
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar--tab, tab-bar--current-tab): Add tab group if any.
(tab-bar-change-tab-group): New command.
(display-buffer-in-new-tab): Handle tab-group alist entry.
(tab-group): New alias.
(tab-prefix-map): Bind "G" to 'tab-group'.
|
|
|
|
|
|
|
|
|
| |
WINDOW arg nil will always create a new window regardless of the value
returned by 'frame-root-window' that is nondeterministic - it returns
an internal window when there are more than 1 window on the frame/tab,
otherwise it returns a live window that was reused between different tabs
(bug#46904)
(tab-prefix-map): Bind "u" to 'tab-undo'.
|
|
|
|
|
| |
(tab-bar-select-tab-modifiers): Use tab-bar--undefine-keys and
tab-bar--define-keys instead of turning tab-bar-mode on/off.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar--define-keys): Update global-mode-string
in mode-line-misc-info with condition to disable global-mode-string
in the mode line.
(tab-bar-format): New variable.
(tab-bar-format-history, tab-bar-format-add-tab)
(tab-bar-format-tabs): New functions with body from
'tab-bar-make-keymap-1'.
(tab-bar-format-align-right, tab-bar-format-global): New functions for
'tab-bar-format' list.
(tab-bar-format-list): New utility function.
(tab-bar-make-keymap-1): Just call 'tab-bar-format-list'.
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01210.html
|
| |
|
|
|
|
| |
(tab-prefix-map): Bind "O" to 'tab-previous'.
|
|
|
|
|
| |
(tab-bar-separator): New function.
(tab-bar-make-keymap-1): Use it.
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-new-tab-to): Negative TO-INDEX counts
tabs from the end of the tab bar.
(tab-bar-new-tab): Fix docstring to add reference to
'tab-bar-new-tab-to'.
(tab-prefix-map): Bind "N" to tab-new-to.
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-move-tab-to): Negative TO-INDEX counts
tabs from the end of the tab bar.
(tab-bar-move-tab): Fix docstring to add reference to tab-bar-move-tab-to.
(tab-prefix-map): Bind "M" to tab-move-to.
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar--define-keys): Rebind 0 from
tab-bar-switch-to-recent-tab to its alias tab-recent.
Bind 9 to tab-last.
(tab-bar-switch-to-last-tab): New command.
(tab-last): New alias to tab-bar-switch-to-last-tab.
(tab-bar-switch-to-tab, tab-bar-undo-close-tab): Fix docstrings to
avoid mentioning the term "last" for "most recently used" meaning.
|
| |
|
| |
|
|
|
|
|
| |
(toggle-frame-tab-bar): Add frame parameter to protect tab bar state.
(tab-bar--update-tab-bar-lines): Check parameter.
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines)
(tab-bar--tab-bar-lines-for-frame):
New functions to update value of tab-bar-lines in frames.
(tab-bar-mode, tab-bar-new-tab-to, tab-bar-close-tab)
(tab-bar-close-other-tab, tab-bar-show :set):
Use new function.
(tab-bar-select-tab-modifiers :set):
Work around visual glitch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/abbrev.el:
* lisp/bindings.el (mode-line-mule-info, mode-line-modified)
(mode-line-remote, mode-line-process)
(mode-line-buffer-identification):
* lisp/buff-menu.el (Buffer-menu-files-only):
* lisp/files.el (buffer-file-number, buffer-file-read-only)
(local-write-file-hooks, write-contents-functions)
(file-local-variables-alist, dir-local-variables-alist)
(save-buffer-coding-system, buffer-save-without-query):
* lisp/font-core.el (font-lock-defaults):
* lisp/font-lock.el (font-lock-keywords-case-fold-search)
(font-lock-syntactically-fontified)
(font-lock-extend-after-change-region-function)
(font-lock-extend-region-functions, font-lock-major-mode):
* lisp/menu-bar.el (list-buffers-directory):
* lisp/simple.el (next-error--message-highlight-overlay)
(next-error-buffer, next-error-function)
(next-error-move-function, goto-line-history)
(minibuffer-default-add-done, undo-extra-outer-limit):
* lisp/tab-bar.el (tab-switcher-column):
* lisp/term/ns-win.el (ns-select-overlay):
* lisp/window.el (window-size-fixed, window-area-factor)
(window-group-start-function, window-group-end-function)
(set-window-group-start-function)
(recenter-window-group-function)
(pos-visible-in-window-group-p-function)
(selected-window-group-function)
(move-to-window-group-line-function): Prefer defvar-local.
|
|
|
|
|
| |
* lisp/tab-bar.el (tab-bar-show): Change :set lambda to update all frames.
Improve docstring.
|
|
|
|
|
| |
(tab-bar-tab-name-format-default): New function as the default value.
(tab-bar-make-keymap-1): Funcall tab-bar-tab-name-format-function.
|
| |
|