Commit dc78327e authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from origin/emacs-27

e7a3ed8a Fix tab-bar-tab-name-ellipsis initialization
4737d0af Fix Elisp manual entry for format-spec
0195809b Fix rare assertion violations in 'etags'
cddb0079 ; * lisp/format-spec.el (format-spec): Fix typo.
parents ae348f32 e7a3ed8a
......@@ -4698,10 +4698,7 @@ following modifiers can be used:
@table @asis
@item @samp{0}
Use zero padding.
@item @samp{@ }
User space padding.
Pad with zeros instead of the default spaces.
@item @samp{-}
Pad to the right.
......@@ -4713,7 +4710,7 @@ Use upper case.
Use lower case.
@item @samp{<}
If the length needs to limited, remove characters from the left.
If the length needs to be limited, remove characters from the left.
@item @samp{>}
Same as previous, but remove characters from the right.
......@@ -4723,9 +4720,9 @@ If contradictory modifiers are used (for instance, both upper and
lower case), then what happens is undefined.
As an example, @samp{"%<010b"} means ``insert the @samp{b} expansion,
but pad with leading zeroes if it's less than ten characters, and if
but pad with leading zeros if it's less than ten characters, and if
it's more than ten characters, shorten by removing characters from the
left''.
left.''
@node Checksum/Hash
......
......@@ -1985,8 +1985,11 @@ pfnote (char *name, bool is_func, char *linestart, ptrdiff_t linelen,
{
register node *np;
assert (name == NULL || name[0] != '\0');
if (CTAGS && name == NULL)
if ((CTAGS && name == NULL)
/* We used to have an assertion here for the case below, but if we hit
that case, it just means our parser got confused, and there's nothing
to do about such empty "tags". */
|| (!CTAGS && name && name[0] == '\0'))
return;
np = xnew (1, node);
......
......@@ -41,7 +41,7 @@ For instance:
Each format spec can have modifiers, where \"%<010b\" means \"if
the expansion is shorter than ten characters, zero-pad it, and if
it's longer, chop off characters from the left size\".
it's longer, chop off characters from the left side\".
The following modifiers are allowed:
......
......@@ -376,19 +376,22 @@ to `tab-bar-tab-name-truncated'."
:group 'tab-bar
:version "27.1")
(defvar tab-bar-tab-name-ellipsis
(if (char-displayable-p ?) "…" "..."))
(defvar tab-bar-tab-name-ellipsis nil)
(defun tab-bar-tab-name-truncated ()
"Generate tab name from the buffer of the selected window.
Truncate it to the length specified by `tab-bar-tab-name-truncated-max'.
Append ellipsis `tab-bar-tab-name-ellipsis' in this case."
(let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window)))))
(let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window))))
(ellipsis (cond
(tab-bar-tab-name-ellipsis)
((char-displayable-p ?) "…")
("..."))))
(if (< (length tab-name) tab-bar-tab-name-truncated-max)
tab-name
(propertize (truncate-string-to-width
tab-name tab-bar-tab-name-truncated-max nil nil
tab-bar-tab-name-ellipsis)
ellipsis)
'help-echo tab-name))))
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment