summaryrefslogtreecommitdiff
path: root/lisp/tab-line.el
Commit message (Collapse)AuthorAge
* * lisp/tab-line.el (tab-line-new-tab): Use tty menus when supported.Jared Finder2021-01-30
|
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* * lisp/tab-line.el: New options, faces, and functionsAdam Porter2020-12-23
| | | | | | | | | | | | | | * lisp/tab-line.el: (tab-line-tab-face-functions): New option. (tab-line-tab-inactive-alternate): New face. (tab-line-tab-special): New face. (tab-line-tab-face-inactive-alternating): New function. (tab-line-tab-face-special): New function. (tab-line-format-template): Use them. * etc/NEWS: Update. With thanks to Juri Linkov and Eli Zaretskii for their guidance.
* Use '…' for ellipsis in truncate-string-to-width by default (bug#41250)Juri Linkov2020-10-04
| | | | | | | | | | | | | | | | * lisp/international/mule-util.el (truncate-string-ellipsis): Change the default value to nil. (truncate-string-ellipsis): New function. (truncate-string-to-width): Use the value returned from the function 'truncate-string-ellipsis'. * lisp/tab-bar.el (tab-bar-tab-name-truncated): * lisp/tab-line.el (tab-line-tab-name-ellipsis): Take advantage of the improvement of the ellipsis default value in truncate-string-to-width and truncate-string-ellipsis. * doc/lispref/display.texi (Size of Displayed Text): Improve description of truncate-string-ellipsis.
* ; * lisp/tab-line.el (tab-line-switch-cycling): Fix last change.Eli Zaretskii2020-09-13
|
* Clarify when tab-line-switch-cycling is usedKiso Katsuyuki2020-09-13
| | | | | | * lisp/tab-line.el (tab-line-switch-cycling): Clarify when the variable is used. Copyright-paperwork-exempt: yes
* ; Silence byte-compilation warning in last changeBasil L. Contovounesios2020-09-10
| | | | | * lisp/tab-line.el (tab-line-switch-cycling): Move definition before first use.
* ; Fix typo in last changeBasil L. Contovounesios2020-09-10
|
* Introduce a new variable tab-line-switch-cyclingKiso Katsuyuki2020-09-09
| | | | | | If it is set t, enable cycling tab switch. Default is nil. Copyright-paperwork-exempt: yes
* Suppress errors of tab-line-switch functionsKiso Katsuyuki2020-09-09
| | | | | | | | Traget errors occurs when tab-line-switch-to-prev-tab or tab-line-switch-to-next-tab is invoked in a buffer which is not in tabs Copyright-paperwork-exempt: yes
* Add support for horizontal scrolling in tab-lineDaniel Martín2020-09-07
| | | | | | | | | * lisp/tab-line.el ([tab-line wheel-left]): Bind left and right tab line scrolling to the 'wheel-left' and 'wheel-right' mouse events. ([tab-line S-wheel-right]): Analogous change for the functions that switch tabs. * etc/NEWS: Announce the new feature (bug#43224). Copyright-paperwork-exempt: yes
* Move tab-bar and tab-line faces to faces.el (part of bug#41200)Juri Linkov2020-06-08
| | | | | | | | | | | | | | | | These are basic faces, so they need to be defined in faces.el, otherwise (get 'tab-line 'face) returns 0. * lisp/faces.el (tab-bar, tab-line): Move faces here from tab-bar.el and tab-line.el. * lisp/tab-bar.el (tab-bar): Move face to faces.el. (tab-bar-faces): Add '((tab-bar custom-face)) to the second arg MEMBERS of 'defgroup'. * lisp/tab-line.el (tab-line): Move face to faces.el. (tab-line-faces): Add '((tab-line custom-face)) to the second arg MEMBERS of 'defgroup'.
* Fix bugs in tab-bar and tab-line and mention remaining features in manual.Juri Linkov2020-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/frames.texi (Tab Bars): Mention tab-bar-new-tab-to, tab-bar-close-last-tab-choice, tab-bar-close-tab-select, tab-undo, tab-select, tab-bar-history-mode. * doc/emacs/windows.texi (Tab Line): Mention tab-line-tabs-function. * lisp/tab-bar.el (tab-bar-select-tab-modifiers): Mention tab-bar-tab-hints in docstring. (tab-bar-tab-hints): Mention tab-bar-select-tab-modifiers in docstring. (tab-bar-select-tab): Mention tab-bar-select-tab-modifiers in docstring. (tab-bar-switch-to-tab): Expand the docstring. (tab-bar-new-tab-to): Fix bug in handling 'left' value. (tab-bar-close-tab): Fix bug in handling 'left' value. (tab-bar-undo-close-tab): Use funcall tab-bar-tabs-function instead of direct call to tab-bar-tabs. (tab-bar-history-back, tab-bar-history-forward): Add docstrings. (tab-bar-history-mode): Expand docstring. * lisp/tab-line.el (tab-line-format): Fix bug for handling window switching that should set face 'tab-line-tab-current'.
* * lisp/tab-line.el (tab-line-new-button-show): New defcustom.Juri Linkov2020-03-20
| | | | | | * lisp/tab-line.el (tab-line-format-template): Use tab-line-new-button-show. (tab-line-new-tab-choice): Remove choice 'nil' with "No button". (tab-line-separator): Add docstring.
* * lisp/tab-line.el: Fix tab-line-format and tab-line-format-template.Juri Linkov2020-03-17
| | | | | | | * lisp/tab-line.el (tab-line-format): Use buffer-name in the cache key instead of just buffer object to invalidate the cache on buffer renaming. (tab-line-format-template): Always leave the separator after the last tab like tab-bar.el already does.
* * lisp/tab-line.el: Fix auto-hscrolling (bug#39649)Juri Linkov2020-02-29
| | | | | | | | | | | | | | | | Distinguish offsets between manual-vs-automatic scrolling as integers-vs-floats instead of positive-vs-negative integers. * lisp/tab-line.el (tab-line-format-template): Use 'numberp' instead of 'integerp', and 'truncate' instead of 'abs'. (tab-line-format): When the window-buffer was updated, set window-parameter to float to enable auto-hscroll after it was disabled on manual scrolling. (tab-line-auto-hscroll-buffer): New variable with internal buffer. (tab-line-auto-hscroll): Erase in tab-line-auto-hscroll-buffer. Use 'numberp' instead of 'integerp', 'truncate' instead of 'abs', and 'float' instead of '-'. (tab-line-hscroll): Use 'numberp' instead of 'integerp', and 'truncate' instead of 'abs'.
* Fix faces tab-bar and tab-line.Juri Linkov2020-02-05
| | | | | | * lisp/tab-bar.el (tab-bar) <defface>: * lisp/tab-line.el (tab-line) <defface>: Check for min-colors 88 instead of type x.
* Tab-bar related finishing touches.Juri Linkov2020-01-23
| | | | | | | | | | * lisp/tab-bar.el (tab-bar-tab-name-ellipsis): Use shorter name instead of tab-bar-tab-name-truncated-ellipsis. (tab-bar-new-tab-to) <defcustom>: Add 'function' option. (tab-bar-new-tab-to) <function>: Use it. * lisp/tab-line.el (tab-line-close-tab): Add missing arg 'tab' to tab-line-close-tab-function funcall.
* Allow optional truncation of tab names in tab-bar and tab-line (bug#38693)Juri Linkov2020-01-21
| | | | | | | | | | | | | | | | | | | * lisp/tab-line.el (tab-line-tab-name-truncated-max): New defcustom. (tab-line-tab-name-truncated-buffer): Use tab-line-tab-name-truncated-max consistently with similar options in tab-bar.el. (tab-line-tabs-limit): Remove variable. (tab-line-tabs-window-buffers): Remove use of tab-line-tabs-limit that was an experimental feature before horizontal scrolling was implemented. (tab-line-close-tab-function): Rename from tab-line-close-tab-action and allow a customizaed function as option. (tab-line-close-tab): Call function if tab-line-close-tab-function is customized to a function. * lisp/tab-bar.el (tab-bar-tab-name-function): Add option tab-bar-tab-name-truncated. (tab-bar-tab-name-truncated-max): New defcustom. (tab-bar-tab-name-truncated-ellipsis): New variable. (tab-bar-tab-name-truncated): New function.
* * lisp/tab-line.el (tab-line-auto-hscroll): Fix for long tab names.Juri Linkov2020-01-20
| | | | | Check for nil value returned by previous-single-property-change that happens when tab name is longer than window width.
* Handle tab-bar clicks on a GPM-capable console.Juri Linkov2020-01-13
| | | | | | | | | | * src/term.c (handle_one_term_event): Call tty_handle_tab_bar_click. * src/xdisp.c (tty_handle_tab_bar_click): Force reset of up_modifier bit from the event modifiers. * lisp/tab-line.el (tab-line-tab-current): No need to use inverse-video on console/xterm because the selected tab already uses inverse-video.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* * lisp/tab-line.el (tab-line-auto-hscroll): Improve.Juri Linkov2019-12-16
| | | | | | | | Better handling of tabs scrolled to the left. Don't scroll tabs that are already visible. Remove setq of buffer-undo-list because undo is disabled anyway in internal buffers with name " *temp*".
* * lisp/tab-line.el (tab-line-format): Use composite cache key (bug#38522)Juri Linkov2019-12-09
|
* * lisp/tab-line.el: Cache the tab-line-format template.Juri Linkov2019-12-05
| | | | | (tab-line-format): Cache the result of tab-line-format-template in window. (tab-line-format-template): New function that returns the value to cache.
* * lisp/tab-line.el (tab-line-auto-hscroll): Don't let-bind buffer-local valuesJuri Linkov2019-11-30
| | | | | | Use setq to set buffer-local values of truncate-lines and buffer-undo-list. This will prevent leaking of let-bound values to buffer-local values of the minibuffer.
* * lisp/tab-line.el (tab-line-auto-hscroll): New defcustom (bug#37667)Juri Linkov2019-11-18
| | | | (tab-line-auto-hscroll): Use this option in the function.
* Auto-scrolling in tab-line (bug#37667)Juri Linkov2019-11-17
| | | | | * lisp/tab-line.el (tab-line-auto-hscroll): New function. (tab-line-format): Use tab-line-auto-hscroll.
* * lisp/tab-line.el (tab-line-tabs-buffer-list): Use window-prev-buffers too.Juri Linkov2019-11-14
| | | | | * lisp/tab-line.el (tab-line-tabs-buffer-list): Move window-prev-buffers here from tab-line-tabs-buffer-groups.
* * lisp/tab-line.el (tab-line-tabs-buffer-list-function): New variable.Juri Linkov2019-11-12
| | | | | | | | | | | | | (tab-line-tabs-buffer-list): New function. (tab-line-tabs-mode-buffers, tab-line-tabs-buffer-groups): Call tab-line-tabs-mode-buffers. (tab-line-tabs-buffer-groups): Add 'close' function that uses kill-buffer instead of bury-buffer that makes no sense here. (tab-line-format): Don't show the close button when a tab has no 'close' function or buffer. (tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab): Support tabs with 'buffer' properties. (tab-line-close-tab): Call 'close' function when defined.
* * lisp/tab-line.el: More configurability for tab buffer groups.Juri Linkov2019-11-07
| | | | | | | | | | | | * lisp/tab-line.el (tab-line-tabs-buffer-group-function) (tab-line-tabs-buffer-group-sort-function) (tab-line-tabs-buffer-groups-sort-function): New defvars. (tab-line-tabs-buffer-group-name): Rename from tab-line-tabs-buffer-groups--name and use tab-line-tabs-buffer-group-function. (tab-line-tabs-buffer-groups): Use tab-line-tabs-buffer-groups-sort-function and tab-line-tabs-buffer-group-sort-function. (tab-line-new-tab): Let bind tab-line-tabs-buffer-groups to mouse-buffer-menu-mode-groups.
* * lisp/tab-line.el: New option for tabs where buffers are grouped by mode.Juri Linkov2019-11-06
| | | | | | | | | | | | | * lisp/tab-line.el (tab-line-tabs-function): Add option tab-line-tabs-buffer-groups. (tab-line-tabs-buffer-groups): New defvar defaulted to mouse-buffer-menu-mode-groups. (tab-line-tabs-buffer-groups--name, tab-line-tabs-buffer-groups): New functions. (tab-line-format): Support tabs in the format '(tab (name . "name") ...)'. (tab-line-select-tab): Move part of code to tab-line-select-tab-buffer. (tab-line-select-tab-buffer): New function. (tab-line-tab-current): Rename from tab-line-tab-selected.
* * lisp/tab-line.el (tab-line-tab-selected): New face.Juri Linkov2019-11-02
| | | | | (tab-line-format): Use new face tab-line-tab-selected. ([tab-line]): Move tab-switching mouse wheel commands to S-keys.
* Customizable tab-line-tabs-function and new buffer-local tab-line-mode.Juri Linkov2019-10-27
| | | | | | | | | | | | | | | | | | | | | | * lisp/tab-line.el (tab-line-tabs-function): Turn defvar into defcustom with default of tab-line-tabs-window-buffers. (tab-line-tabs-mode-buffers): New function. (tab-line-tabs-window-buffers): Rename from tab-line-tabs. (tab-line-select-tab, tab-line-switch-to-prev-tab) (tab-line-switch-to-next-tab): Handle the value tab-line-tabs-window-buffers of tab-line-tabs-function specially. (tab-line-mode): Rename from global-tab-line-mode and change scope to buffer-local. (global-tab-line-mode): New globalized-minor-mode. (tab-line-mode--turn-on): New function. (tab-line-exclude-modes): New defcustom. (tab-line-exclude): New buffer-local variable. https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00988.html * lisp/dired.el (dired-mark-pop-up): Set tab-line-exclude to nil. Don't set tab-line-format. (Bug#37699) * lisp/speedbar.el (speedbar-mode): Set tab-line-exclude to nil. Don't set tab-line-format.
* Tab-line horizontal scrolling with UI buttons and commands (bug#37667)Juri Linkov2019-10-23
| | | | | | | | | | | | | | | | | | | * etc/images/tabs/left-arrow.xpm: * etc/images/tabs/right-arrow.xpm: New images. * lisp/tab-line.el (tab-line-left-map, tab-line-right-map): New keymaps. (tab-line-left-button, tab-line-right-button): New variables. (tab-line-tab-name-function): Turn defvar into defcustom. (tab-line-tab-name-buffer): New function. (tab-line-tab-name-truncated-buffer): Rename from tab-line-tab-name. (tab-line-tabs-limit): Default to nil. (tab-line-tabs): Behavior depends on tab-line-tabs-limit. (tab-line-format): Use window-parameter tab-line-hscroll. Add left/right buttons. (tab-line-hscroll): New function. (tab-line-hscroll-right, tab-line-hscroll-left): New commands bound to mouse-wheel. Rebind tab-switching commands to mouse-wheel with Ctrl-modifier.
* * lisp/tab-line.el: Bind mouse commands to [tab-line].Juri Linkov2019-10-21
| | | | | | | | | * lisp/tab-line.el: Bind mouse-4/mouse-5, wheel-up/wheel-down globally to [tab-line]. (tab-line-tab-map): Remove local bindings of mouse-4/mouse-5. (tab-line-new-tab, tab-line-switch-to-prev-tab) (tab-line-switch-to-next-tab, tab-line-close-tab): Turn commands into mouse-free (can be used without mouse).
* Don't use expand-file-name to find images for tabs.Juri Linkov2019-10-15
| | | | | | * lisp/tab-bar.el (tab-bar-mode): * lisp/tab-line.el (tab-line-new-button, tab-line-close-button): Remove expand-file-name with data-directory.
* Set tab-line face height to 0.9.Juri Linkov2019-10-15
| | | | | * lisp/tab-line.el (tab-line): Set :height to 0.9. * lisp/tab-bar.el (tab-bar): Remove :height.
* Use variable-pitch fonts in tab-bar and tab-line facesJuri Linkov2019-10-14
| | | | | | * lisp/tab-bar.el (tab-bar): * lisp/tab-line.el (tab-line): Inherit face from variable-pitch.
* * lisp/tab-bar.el (tab-bar-show): New defcustom.Juri Linkov2019-10-02
| | | | | | | | | | * lisp/tab-bar.el (tab-bar-close-current-tab, tab-bar-close-tab): (tab-bar-new-tab): Use tab-bar-show. * doc/emacs/frames.texi (Tab Bars): Add tab-bar-show. * lisp/speedbar.el (speedbar-mode): Set buffer-local tab-bar-mode and tab-line-format to nil to not show in dedicated speedbar frame.
* * lisp/tab-line.el: Add new defcustom tab-line-close-tab-action.Juri Linkov2019-09-28
|
* Improve customization.Juri Linkov2019-09-25
| | | | | | | | | * lisp/tab-bar.el (tab-bar-new-tab-choice) (tab-bar-close-button-show): New defcustoms. (tab-bar-tab-name-function): New defvar. * lisp/tab-line.el (tab-line-new-tab-choice) (tab-line-close-button-show): New defcustoms.
* Small fixes. Bind [tab-line mouse-1] to mouse-select-window.Juri Linkov2019-09-25
|
* Improve customizability and better tab separators.Juri Linkov2019-09-22
| | | | | | | * lisp/tab-bar.el (tab-bar-tabs-function): New defvar. * lisp/tab-line.el (tab-line-tab-name-function) (tab-line-tabs-function): New defvars.
* Use images for new/close buttons in tab-bar and tab-line.Juri Linkov2019-09-15
| | | | | | | | | | | | | | | | | | | * etc/images/tabs/new.xpm: * etc/images/tabs/close.xpm: New files. * lisp/tab-bar.el (tab-bar-separator): New face. (tab-bar-separator, tab-bar-button-new, tab-bar-button-close): Use display property with images in default values. * lisp/tab-line.el (tab-line-button-new, tab-line-button-close): Use display property with images in default values. * src/xdisp.c (tab_bar_item_info): Add new arg close_p and set it to the value of property `close' at charpos. (get_tab_bar_item): Add new arg close_p. (handle_tab_bar_click): Add ctrl_modifier when close_p is non-nil. (Fdump_tab_bar_row): Fix crash for non-X builds.
* Small fixes for tty and w32.Juri Linkov2019-09-08
| | | | | | | * lisp/menu-bar.el (showhide-tab-bar): Visible on tty too. * lisp/tab-bar.el (tab-bar-mode): Add binding [(control shift tab)] for w32. * lisp/tab-line.el (tab-line-add-tab): Use tmm-prompt for buffer-menu on tty. * src/w32term.c (w32_read_socket): Fix tool-bar clicks.
* * lisp/tab-bar.el (tab-bar-make-keymap-1): Don't use fixed "Current tab".Juri Linkov2019-09-07
| | | | | | * lisp/tab-bar.el (tab-bar-make-keymap-1): * lisp/tab-line.el (tab-line-tab-name-add): Add space after Unicode char to avoid char clobbering on terminals.
* Don't use hook pre-redisplay-functions. Set buffer-local tab-line-format.Juri Linkov2019-09-05
| | | | | | | | | | | | | | | * lisp/tab-line.el (tab-line-format): Move to C. (tab-line-update-window-parameter): Remove function. (global-tab-line-mode): Set the default value of tab-line-format. * src/buffer.c (syms_of_buffer): Define buffer-local variable tab-line-format. * src/buffer.h (struct buffer): Add tab_line_format_. * src/window.c (window_wants_tab_line): * src/xdisp.c (pos_visible_p, display_mode_lines): Check for buffer-local tab_line_format.
* * lisp/tab-line.el (tab-line-tab-name): Try to use truncate-string-to-width.Juri Linkov2019-09-03
|
* * lisp/tab-line.el: Limit the number of window tabs to tab-line-tabs-limit.Juri Linkov2019-09-03
|