aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2020-05-28 07:50:25 -0700
committerGlenn Morris2020-05-28 07:50:25 -0700
commitdc78327e32fb7496dca10e17189a4d1b7d4923f4 (patch)
tree63393826171effba54be37839174005650519fe6 /lisp
parentae348f328643e55ea2d2e8fd42ff034d08855cae (diff)
parente7a3ed8a6dddb6e16c83d27a04dfa6ec8160e580 (diff)
downloademacs-dc78327e32fb7496dca10e17189a4d1b7d4923f4.tar.gz
emacs-dc78327e32fb7496dca10e17189a4d1b7d4923f4.zip
Merge from origin/emacs-27
e7a3ed8a6d Fix tab-bar-tab-name-ellipsis initialization 4737d0af75 Fix Elisp manual entry for format-spec 0195809bb6 Fix rare assertion violations in 'etags' cddb0079ff ; * lisp/format-spec.el (format-spec): Fix typo.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/format-spec.el2
-rw-r--r--lisp/tab-bar.el11
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/format-spec.el b/lisp/format-spec.el
index ee545d6d972..f418cea4259 100644
--- a/lisp/format-spec.el
+++ b/lisp/format-spec.el
@@ -41,7 +41,7 @@ For instance:
41 41
42Each format spec can have modifiers, where \"%<010b\" means \"if 42Each format spec can have modifiers, where \"%<010b\" means \"if
43the expansion is shorter than ten characters, zero-pad it, and if 43the expansion is shorter than ten characters, zero-pad it, and if
44it's longer, chop off characters from the left size\". 44it's longer, chop off characters from the left side\".
45 45
46The following modifiers are allowed: 46The following modifiers are allowed:
47 47
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index ce6d8c33dd1..d24d59cb7e8 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -376,19 +376,22 @@ to `tab-bar-tab-name-truncated'."
376 :group 'tab-bar 376 :group 'tab-bar
377 :version "27.1") 377 :version "27.1")
378 378
379(defvar tab-bar-tab-name-ellipsis 379(defvar tab-bar-tab-name-ellipsis nil)
380 (if (char-displayable-p ?…) "…" "..."))
381 380
382(defun tab-bar-tab-name-truncated () 381(defun tab-bar-tab-name-truncated ()
383 "Generate tab name from the buffer of the selected window. 382 "Generate tab name from the buffer of the selected window.
384Truncate it to the length specified by `tab-bar-tab-name-truncated-max'. 383Truncate it to the length specified by `tab-bar-tab-name-truncated-max'.
385Append ellipsis `tab-bar-tab-name-ellipsis' in this case." 384Append ellipsis `tab-bar-tab-name-ellipsis' in this case."
386 (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window))))) 385 (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window))))
386 (ellipsis (cond
387 (tab-bar-tab-name-ellipsis)
388 ((char-displayable-p ?…) "…")
389 ("..."))))
387 (if (< (length tab-name) tab-bar-tab-name-truncated-max) 390 (if (< (length tab-name) tab-bar-tab-name-truncated-max)
388 tab-name 391 tab-name
389 (propertize (truncate-string-to-width 392 (propertize (truncate-string-to-width
390 tab-name tab-bar-tab-name-truncated-max nil nil 393 tab-name tab-bar-tab-name-truncated-max nil nil
391 tab-bar-tab-name-ellipsis) 394 ellipsis)
392 'help-echo tab-name)))) 395 'help-echo tab-name))))
393 396
394 397