1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

82 Commits

Author SHA1 Message Date
Juri Linkov
2e8551c076 ; * lisp/tab-line.el (tab-line-cache-key-function): Fix docstring (bug#57848). 2022-11-10 20:35:58 +02:00
Juri Linkov
73953b23aa * lisp/tab-line.el: Allow user-defined cache-key function (bug#57848)
(tab-line-cache-key-default): New function.
(tab-line-cache-key-function): New variable.
(tab-line-format): Funcall tab-line-cache-key-function.
2022-10-30 19:38:41 +02:00
Juri Linkov
44c2915552 * lisp/tab-line.el: Escape %-constructs in tab names (bug#57848)
(tab-line-tab-name-format-default): Replace % with %% in tab name
to escape %-constructs from processing by mode-line-format.
2022-10-30 19:36:06 +02:00
João Guerra
e5cb66c046 * lisp/tab-line.el (tab-line-auto-hscroll): Set word-wrap to nil (bug#58740).
Copyright-paperwork-exempt: yes
2022-10-25 21:49:39 +03:00
Stefan Kangas
4f9902eb0c Prefer defvar-keymap in tab-line.el
* lisp/tab-line.el (tab-line-tab-map, tab-line-add-map)
(tab-line-tab-close-map, tab-line-left-map, tab-line-right-map):
Prefer defvar-keymap.
2022-09-13 11:06:40 +02:00
Stefan Kangas
6a7bb1ddbc Make some additional defcustom types more restrictive
* lisp/desktop.el (desktop-lazy-idle-delay):
* lisp/files.el (dired-kept-versions)
(kept-old-versions, kept-new-versions):
* lisp/filesets.el (filesets-max-submenu-length)
(filesets-max-entry-length, filesets-tree-max-level)
(filesets-query-user-limit):
* lisp/hi-lock.el (hi-lock-file-patterns-range)
(hi-lock-highlight-range):
* lisp/ido.el (ido-max-work-directory-list):
* lisp/image/gravatar.el (gravatar-cache-ttl):
* lisp/imenu.el (imenu-auto-rescan-maxout, imenu-max-items):
* lisp/informat.el (Info-split-threshold):
* lisp/mail/hashcash.el (hashcash-default-payment)
(hashcash-default-accept-payment):
* lisp/mail/mail-hist.el (mail-hist-history-size):
* lisp/mail/smtpmail.el (smtpmail-retries):
* lisp/msb.el (msb-display-most-recently-used):
* lisp/nxml/rng-valid.el (rng-state-cache-distance)
(rng-validate-chunk-size):
* lisp/progmodes/gdb-mi.el (gdb-max-source-window-count):
* lisp/recentf.el (recentf-arrange-by-rules-min-items):
* lisp/simple.el (kill-ring-max, mark-ring-max)
(global-mark-ring-max):
* lisp/tab-line.el (tab-line-tab-name-truncated-max):
* lisp/term.el (term-buffer-maximum-size, term-input-chunk-size):
* lisp/thumbs.el (thumbs-max-image-number)
(thumbs-thumbsdir-max-size, thumbs-relief, thumbs-margin)
(thumbs-image-resizing-step):
* lisp/type-break.el (type-break-interval)
(type-break-good-rest-interval, type-break-query-interval)
(type-break-warning-repeat):
* lisp/vc/compare-w.el (compare-windows-sync-string-size):
* lisp/woman.el (woman-fill-column): Use defcustom :type natnum.

* lisp/emacs-lisp/backtrace.el (backtrace-line-length):
* lisp/doc-view.el (doc-view-conversion-refresh-interval):
Use defcustom :type natnum and allow the nil value.

* lisp/gnus/spam-stat.el (spam-stat-process-directory-age):
Use defcustom :type integer.
2022-07-06 19:29:51 +02:00
Juri Linkov
a6df8f9f99 * lisp/tab-line.el (tab-line-format): Use mode-line-window-selected-p.
Recently 'mode-line-window-selected-p' was added to
'tab-line-tab-name-format-default'.  Now add the same to another
place that handles the face 'tab-line-tab-current' (bug#53629).
2022-02-10 20:52:55 +02:00
Juri Linkov
0f38e2393d Use mode-line-window-selected-p in tab-line-tab-name-format-default.
* lisp/tab-line.el (tab-line-tab-name-format-default):
Use the recently added function 'mode-line-window-selected-p'
for the face 'tab-line-tab-current' (bug#53629).
2022-02-06 19:58:43 +02:00
Juri Linkov
e94f08b2d9 * lisp/tab-line.el: Support non-buffer tabs in some tab face functions.
(tab-line-tab-face-special, tab-line-tab-face-modified): For non-buffer tabs
when 'tab-line-tabs-function' is e.g. 'tab-line-tabs-buffer-groups',
try to get the buffer from the property 'buffer'.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg01923.html
2022-02-01 21:42:51 +02:00
Stefan Monnier
04c0245d36 Merge remote-tracking branch 'origin/emacs-28' into trunk 2022-01-02 17:07:42 -05:00
Juri Linkov
83da3a09d0 * lisp/tab-line.el: Revert part of the fix in a6adfe21e4 (bug#52881)
(tab-line--get-tab-property, tab-line-auto-hscroll): Use get-pos-property
instead of get-text-property that fails after previous-single-property-change.
2022-01-02 20:00:40 +02:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Stefan Kangas
78066671c0 Merge from origin/emacs-28
67400da412 Improve doc strings of fringe indicator variables
a6adfe21e4 * lisp/tab-line.el (tab-line--get-tab-property): New funct...
2022-01-01 06:51:58 +01:00
Juri Linkov
a6adfe21e4 * lisp/tab-line.el (tab-line--get-tab-property): New function (bug#52881).
(tab-line-auto-hscroll): Use ‘tab-line--get-tab-property’ instead of
‘get-pos-property 1’, and ‘get-text-property’ instead of
‘get-pos-property’.
(tab-line-select-tab, tab-line-close-tab): Use tab-line--get-tab-property.
2021-12-31 11:20:51 +02:00
Juri Linkov
d1c7ce68ba * lisp/tab-line.el (tab-line-tab-name-format-default): Add help-echo.
(bug#52889)
2021-12-30 10:08:37 +02:00
Matt Kramer
11e5c7d8ca Fix tab-line cycling when using buffer groups (bug#52050)
* lisp/tab-line.el (tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab):
Remove tabs that aren't associated with a buffer, such as the `group-tab' that
exists when `tab-line-tabs-function' is `tab-line-tabs-buffer-groups'.

Copyright-paperwork-exempt: yes
2021-11-24 21:42:32 +02:00
Juri Linkov
e6df5a32d0 * lisp/tab-line.el (tab-line-mode): Preserve existing value of tab-line-format
Keep the old value of tab-line-format when enabling tab-line-mode
and don't overwrite it with nil when disabling tab-line-mode (bug#51830).
2021-11-14 20:35:42 +02:00
Juri Linkov
a191d3c725 Add new and fix existing docstrings in tab-bar.el and tab-line.el (bug#51247)
* lisp/tab-bar.el (tab-bar--key-to-number)
(tab-bar--event-to-item, tab-bar--format-tab)
(tab-bar--format-tab-group, tab-bar--tab, tab-bar--current-tab)
(tab-bar--current-tab-make): Add/fix docstrings.
2021-10-17 20:09:29 +03:00
Eli Zaretskii
ed9f5546aa Improve doc strings in tab-line.el
* lisp/tab-line.el (tab-line-tab-name-function)
(tab-line-tab-name-truncated-buffer, tab-line-tabs-mode-buffers)
(tab-line-tabs-buffer-group-function)
(tab-line-tabs-buffer-group-sort-function)
(tab-line-tabs-buffer-groups, tab-line-tab-name-format-function)
(tab-line-tab-name-format-default, tab-line-format-template)
(tab-line-tab-face-inactive-alternating)
(tab-line-tab-face-special, tab-line-tab-face-modified)
(tab-line-format, tab-line-auto-hscroll, tab-line-hscroll-right)
(tab-line-hscroll-left, tab-line-new-tab, tab-line-select-tab)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab)
(tab-line-close-tab-function, tab-line-close-tab)
(tab-line-tab-context-menu, tab-line-context-menu)
(tab-line-mode, tab-line-exclude-modes, tab-line-mode--turn-on):
Add or fix doc strings.
2021-10-17 12:49:04 +03:00
Juri Linkov
47e09d1855 Copy parent face attributes to tab-line-tab-current instead of inheriting face
* lisp/tab-line.el (tab-line-tab-current): Don't inherit face from
'tab-line-tab' to not inherit the face attribute :height from 'tab-line',
because :height of mouse-face is added to the base face.
Copy here most of the parent face attributes (bug#50798).
2021-10-11 21:27:50 +03:00
Juri Linkov
931a7276c0 * lisp/tab-line.el (tab-line-format): Add face-modified to the cache key.
When tab-line-tab-face-functions contains tab-line-tab-face-modified,
add 'buffer-modified-p' status to the cache-key, so the cache will expire
when the buffer modification status will change.
https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg00129.html
2021-10-03 20:13:29 +03:00
Adam Porter
fcca1db9fd * lisp/tab-line.el: Add modified-buffer face
(tab-line-tab-modified): New face.
(tab-line-tab-face-modified): New function.
(tab-line-tab-face-functions): Use new function.

* etc/NEWS: Update.
2021-09-25 22:18:11 +03:00
Juri Linkov
3d1f51382f * lisp/tab-line.el: Add context menu bound to down-mouse-3 like on tab bar.
* lisp/tab-line.el: Bind tab-line down-mouse-3 to tab-line-context-menu.
(tab-line-tab-map): Rebind tab-line-select-tab from mouse-1 to down-mouse-1.
Bind down-mouse-3 to tab-line-tab-context-menu.
(tab-line-add-map): Rebind tab-line-new-tab from mouse-1 to down-mouse-1.
(tab-line-left-map, tab-line-right-map): Rebind mouse-1 to down-mouse-1.
(tab-line-tab-context-menu, tab-line-context-menu): New functions.
(tab-line-hscroll-right, tab-line-hscroll-left)
(tab-line-new-tab, tab-line-select-tab)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab)
(tab-line-close-tab): Rename event args to 'event'.
2021-09-15 19:09:33 +03:00
Juri Linkov
274e71f5cc Don't turn mouse-1 into mouse-2 when clicking on the tab-line (bug#49247)
* lisp/tab-line.el (tab-line-tab-name-format-default): For 'tab-line-tab-map'
add the property 'follow-link' with the value 'ignore'.
2021-07-08 20:51:15 +03:00
Juri Linkov
3cd3f230c9 * lisp/tab-line.el: Face cleanup. 2021-03-17 19:42:48 +02:00
Gabriel do Nascimento Ribeiro
0a60e5d33c * lisp/tab-line.el: Update docstring of 'tab-line-tabs-function' (bug#47117)
(tab-line-tabs-function): Mention 'tab-line-tabs-buffer-groups'
in the docstring.
(tab-line-tabs-buffer-groups): Add docstring.
2021-03-14 11:11:12 +02:00
Gabriel do Nascimento Ribeiro
0bfa9e7860 * lisp/tab-line.el: Add face for group-tab (bug#47118)
(tab-line-tab-face-functions): Add choice for 'tab-line-tab-face-group'.
(tab-line-tab-group): New face.
(tab-line-tabs-buffer-groups): Set alist key 'group-tab' for group tabs.
(tab-line-tab-face-group): New function to set face for group tabs.
2021-03-14 11:10:20 +02:00
Juri Linkov
29c0b640ba * lisp/tab-line.el (tab-line-tab-name-format-function): New defcustom.
(tab-line-tab-name-format-default): New function as the default value.
(tab-line-format-template): Funcall tab-line-tab-name-format-function.
This is like recently added tab-bar-tab-name-format-function.
2021-02-23 21:01:31 +02:00
Stefan Kangas
e0fc879c0c Prefer defvar-local in remaining libraries
* lisp/align.el (align-mode-rules-list)
(align-mode-exclude-rules-list):
* lisp/bookmark.el (bookmark-current-bookmark)
(bookmark-annotation-name)
(bookmark--annotation-from-bookmark-list):
* lisp/calc/calc-embed.el (calc-embedded-all-active)
(calc-embedded-some-active):
* lisp/comint.el (comint-password-function):
* lisp/completion.el (completion-syntax-table):
* lisp/dframe.el (dframe-track-mouse-function)
(dframe-help-echo-function, dframe-mouse-click-function)
(dframe-mouse-position-function, dframe-timer)
(dframe-attached-frame, dframe-controlled):
* lisp/ehelp.el (electric-help-orig-major-mode):
* lisp/eshell/esh-util.el (eshell-path-env):
* lisp/expand.el (expand-pos, expand-index, expand-point):
* lisp/face-remap.el (text-scale-mode-remapping)
(text-scale-mode-lighter, text-scale-mode-amount)
(text-scale-remap-header-line, buffer-face-mode-remapping):
* lisp/ffap.el (ffap-menu-alist):
* lisp/files-x.el (connection-local-variables-alist):
* lisp/foldout.el (foldout-fold-list, foldout-mode-line-string):
* lisp/follow.el (follow-start-end-invalid):
* lisp/forms.el (forms--mode-setup):
* lisp/gnus/message.el (message-cross-post-old-target)
(message-options):
* lisp/help-mode.el (help-xref-stack, help-xref-forward-stack)
(help-xref-stack-item, help-xref-stack-forward-item):
* lisp/hexl.el (hexl-mode--old-var-vals, hexl-ascii-overlay):
* lisp/hilit-chg.el (hilit-chg-string):
* lisp/ido.el (ido-eoinput):
* lisp/imenu.el (imenu-generic-expression)
(imenu-create-index-function, imenu-default-goto-function)
(imenu-prev-index-position-function)
(imenu-extract-index-name-function, imenu-name-lookup-function)
(imenu-syntax-alist, imenu-case-fold-search):
* lisp/jka-compr.el (jka-compr-really-do-compress):
* lisp/language/ethio-util.el (ethio-prefer-ascii-space):
* lisp/leim/quail/hangul.el (hangul-input-method-help-text):
* lisp/leim/quail/japanese.el (quail-japanese-package-saved):
* lisp/linum.el (linum-overlays, linum-available):
* lisp/man.el (Man-original-frame, Man-arguments, Man--sections)
(Man--refpages, Man-page-list, Man-current-page)
(Man-page-mode-string):
* lisp/pcomplete.el (pcomplete-current-completions)
(pcomplete-last-completion-length)
(pcomplete-last-completion-stub, pcomplete-last-completion-raw)
(pcomplete-last-window-config, pcomplete-window-restore-timer):
* lisp/reveal.el (reveal-open-spots, reveal-last-tick):
* lisp/ruler-mode.el (ruler-mode):
* lisp/scroll-lock.el (scroll-lock-preserve-screen-pos-save):
* lisp/server.el (server-buffer-clients, server-existing-buffer):
* lisp/tab-line.el (tab-line-exclude):
* lisp/tar-mode.el (tar-data-buffer, tar-data-swapped):
* lisp/thumbs.el (thumbs-current-tmp-filename)
(thumbs-current-image-filename, thumbs-extra-images)
(thumbs-image-num, thumbs-buffer, thumbs-marked-list):
* lisp/tutorial.el (tutorial--point-before-chkeys)
(tutorial--point-after-chkeys, tutorial--lang):
* lisp/url/url-vars.el (url-current-object)
(url-current-mime-headers, url-current-lastloc):
* lisp/view.el (view-mode, view-old-buffer-read-only)
(view-old-Helper-return-blurb, view-page-size)
(view-half-page-size, view-last-regexp, view-return-to-alist)
(view-exit-action, view-overlay):
* lisp/wid-edit.el (widget-global-map, widget-field-new)
(widget-field-list, widget-field-last, widget-field-was):
* lisp/woman.el (woman-imenu-done): Prefer defvar-local.
2021-02-02 09:57:07 +01:00
Jared Finder
0e2e1caa0b * lisp/tab-line.el (tab-line-new-tab): Use tty menus when supported. 2021-01-30 11:31:47 +02:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Adam Porter
33210c8dc0 * lisp/tab-line.el: New options, faces, and functions
* 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.
2020-12-23 23:05:55 +02:00
Juri Linkov
5ec21155c3 Use '…' for ellipsis in truncate-string-to-width by default (bug#41250)
* 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.
2020-10-04 22:41:36 +03:00
Eli Zaretskii
cc24931b2f ; * lisp/tab-line.el (tab-line-switch-cycling): Fix last change. 2020-09-13 18:27:44 +03:00
Kiso Katsuyuki
2605eb9d0e Clarify when tab-line-switch-cycling is used
* lisp/tab-line.el (tab-line-switch-cycling): Clarify when the
variable is used.
Copyright-paperwork-exempt: yes
2020-09-13 15:23:25 +02:00
Basil L. Contovounesios
d08568e6e9 ; Silence byte-compilation warning in last change
* lisp/tab-line.el (tab-line-switch-cycling): Move definition before
first use.
2020-09-10 00:20:24 +01:00
Basil L. Contovounesios
60cb56e999 ; Fix typo in last change 2020-09-10 00:15:09 +01:00
Kiso Katsuyuki
5d43609095 Introduce a new variable tab-line-switch-cycling
If it is set t, enable cycling tab switch.  Default is nil.

Copyright-paperwork-exempt: yes
2020-09-09 22:24:06 +03:00
Kiso Katsuyuki
c3f986a455 Suppress errors of tab-line-switch functions
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
2020-09-09 22:24:06 +03:00
Daniel Martín
438cdc3328 Add support for horizontal scrolling in tab-line
* 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
2020-09-07 17:10:30 +02:00
Juri Linkov
6eb18a950d Move tab-bar and tab-line faces to faces.el (part of bug#41200)
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'.
2020-06-08 03:21:42 +03:00
Juri Linkov
f0e1bf56f0 Fix bugs in tab-bar and tab-line and mention remaining features in manual.
* 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'.
2020-04-27 01:28:36 +03:00
Juri Linkov
7515252cce * lisp/tab-line.el (tab-line-new-button-show): New defcustom.
* 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.
2020-03-20 01:21:57 +02:00
Juri Linkov
a2dd8c4234 * lisp/tab-line.el: Fix tab-line-format and tab-line-format-template.
* 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.
2020-03-17 01:11:27 +02:00
Juri Linkov
6b48aedb6b * lisp/tab-line.el: Fix auto-hscrolling (bug#39649)
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'.
2020-02-29 23:49:17 +02:00
Juri Linkov
ef5fba9f40 Fix faces tab-bar and tab-line.
* lisp/tab-bar.el (tab-bar) <defface>:
* lisp/tab-line.el (tab-line) <defface>:
Check for min-colors 88 instead of type x.
2020-02-05 01:27:30 +02:00
Juri Linkov
92f080dda8 Tab-bar related finishing touches.
* 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.
2020-01-23 01:23:17 +02:00
Juri Linkov
3ba0db41e3 Allow optional truncation of tab names in tab-bar and tab-line (bug#38693)
* 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.
2020-01-21 01:03:37 +02:00
Juri Linkov
92f30d62c0 * lisp/tab-line.el (tab-line-auto-hscroll): Fix for long tab names.
Check for nil value returned by previous-single-property-change that
happens when tab name is longer than window width.
2020-01-20 02:35:53 +02:00