[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 04c0245d36: Merge remote-tracking branch 'origin/emacs-28' into t
From: |
Stefan Monnier |
Subject: |
master 04c0245d36: Merge remote-tracking branch 'origin/emacs-28' into trunk |
Date: |
Sun, 2 Jan 2022 17:07:54 -0500 (EST) |
branch: master
commit 04c0245d36a7face6a4f4b45a56f65f3a282790f
Merge: 9e7191048b 6e53178a37
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Merge remote-tracking branch 'origin/emacs-28' into trunk
---
doc/lispref/os.texi | 11 +++++++++--
lisp/international/mule-cmds.el | 10 ++++++++--
lisp/tab-line.el | 14 +++++++-------
src/timefns.c | 7 ++++---
src/xdisp.c | 10 +++++++++-
5 files changed, 37 insertions(+), 15 deletions(-)
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 0849663ba5..3750abc4e8 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -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
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index de1331e12a..27defef648 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -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)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 90eb84cfac..1c1217cdf6 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -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)
diff --git a/src/timefns.c b/src/timefns.c
index 9dfe134908..f73c69149f 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -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
diff --git a/src/xdisp.c b/src/xdisp.c
index 7cdb90a9b6..6e94ff5ec6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -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