1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Merge remote-tracking branch 'origin/emacs-28' into trunk

This commit is contained in:
Stefan Monnier 2022-01-02 17:07:42 -05:00
commit 04c0245d36
5 changed files with 37 additions and 15 deletions

View File

@ -1794,9 +1794,16 @@ This stands for the ISO 8601 date format, which is like
@samp{%+4Y-%m-%d} except that any flags or field width override the
@samp{+} and (after subtracting 6) the @samp{4}.
@item %g
This stands for the year corresponding to the ISO week within the century.
@cindex ISO week, in time formatting
This stands for the year without century (00--99) corresponding to the
current @dfn{ISO week} number. ISO weeks start on Monday and end on
Sunday. If an ISO week begins in one year and ends in another, the
rules regarding which year @samp{%g} will produce are complex and will
not be described here; however, in general, if most of the week's days
are in the ending year, @samp{%g} will produce that year.
@item %G
This stands for the year corresponding to the ISO week.
This stands for the year with century corresponding to the current ISO
week number.
@item %h
This is a synonym for @samp{%b}.
@item %H

View File

@ -2958,8 +2958,14 @@ See also the documentation of `get-char-code-property' and
(or (stringp table)
(error "Not a char-table nor a file name: %s" table)))
(if (stringp table) (setq table (purecopy table)))
(setf (alist-get name char-code-property-alist) table)
(put name 'char-code-property-documentation (purecopy docstring)))
(if (and (stringp table)
(char-table-p (alist-get name char-code-property-alist)))
;; The table is already setup and we're apparently trying to
;; undo that, probably because `charprop.el' is being re-loaded.
;; Just skip it, in order to work around a recursive load (bug#52945).
nil
(setf (alist-get name char-code-property-alist) table)
(put name 'char-code-property-documentation (purecopy docstring))))
(defvar char-code-property-table
(make-char-table 'char-code-property-table)

View File

@ -618,10 +618,10 @@ the selected tab visible."
(defvar tab-line-auto-hscroll-buffer (generate-new-buffer " *tab-line-hscroll*"))
(defun tab-line--get-tab-property (prop string)
(or (get-text-property 1 prop string) ;; for 99% cases of 1-char separator
(get-text-property 0 prop string) ;; for empty separator
(or (get-pos-property 1 prop string) ;; for most cases of 1-char separator
(get-pos-property 0 prop string) ;; for empty separator
(let ((pos (next-single-property-change 0 prop string))) ;; long separator
(and pos (get-text-property pos prop string)))))
(and pos (get-pos-property pos prop string)))))
(defun tab-line-auto-hscroll (strings hscroll)
(with-current-buffer tab-line-auto-hscroll-buffer
@ -658,9 +658,9 @@ the selected tab visible."
(if (> (vertical-motion 1) 0)
(let* ((point (previous-single-property-change (point) 'tab))
(tab-prop (when point
(or (get-text-property point 'tab)
(or (get-pos-property point 'tab)
(and (setq point (previous-single-property-change point 'tab))
(get-text-property point 'tab)))))
(get-pos-property point 'tab)))))
(new-hscroll (when tab-prop
(seq-position strings tab-prop
(lambda (str tab)
@ -685,9 +685,9 @@ the selected tab visible."
(when (> (vertical-motion 1) 0)
(let* ((point (previous-single-property-change (point) 'tab))
(tab-prop (when point
(or (get-text-property point 'tab)
(or (get-pos-property point 'tab)
(and (setq point (previous-single-property-change point 'tab))
(get-text-property point 'tab)))))
(get-pos-property point 'tab)))))
(new-hscroll (when tab-prop
(seq-position strings tab-prop
(lambda (str tab)

View File

@ -1384,8 +1384,9 @@ without consideration for daylight saving time.
The value is a copy of FORMAT-STRING, but with certain constructs replaced
by text that describes the specified date and time in TIME:
%Y is the year, %y within the century, %C the century.
%G is the year corresponding to the ISO week, %g within the century.
%Y is the year, %y year without century, %C the century.
%G is the year corresponding to the ISO week, %g year corresponding
to the ISO week, without century.
%m is the numeric month.
%b and %h are the locale's abbreviated month name, %B the full name.
(%h is not supported on MS-Windows.)
@ -1393,7 +1394,7 @@ by text that describes the specified date and time in TIME:
%u is the numeric day of week from 1 (Monday) to 7, %w from 0 (Sunday) to 6.
%a is the locale's abbreviated name of the day of week, %A the full name.
%U is the week number starting on Sunday, %W starting on Monday,
%V according to ISO 8601.
%V the week number according to ISO 8601.
%j is the day of the year.
%H is the hour on a 24-hour clock, %I is on a 12-hour clock, %k is like %H

View File

@ -13873,11 +13873,15 @@ tab_bar_height (struct frame *f, int *n_rows, bool pixelwise)
0, 0, 0, STRING_MULTIBYTE (f->desired_tab_bar_string));
it.paragraph_embedding = L2R;
clear_glyph_row (temp_row);
while (!ITERATOR_AT_END_P (&it))
{
clear_glyph_row (temp_row);
it.glyph_row = temp_row;
display_tab_bar_line (&it, -1);
/* If the tab-bar string includes newlines, get past it, because
display_tab_bar_line doesn't. */
if (ITERATOR_AT_END_OF_LINE_P (&it))
set_iterator_to_next (&it, true);
}
clear_glyph_row (temp_row);
@ -14003,6 +14007,10 @@ redisplay_tab_bar (struct frame *f)
extra -= h;
}
display_tab_bar_line (&it, height + h);
/* If the tab-bar string includes newlines, get past it,
because display_tab_bar_line doesn't. */
if (ITERATOR_AT_END_OF_LINE_P (&it))
set_iterator_to_next (&it, true);
}
}
else