From 37e11a631937986f03f6216655ea1c964f7286aa Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 8 Aug 2011 11:53:35 -0400 Subject: Lisp code shouldn't use set-time-zone-rule except through setenv. * time.el (display-time-world-list, display-time-world-display): * time-stamp.el (time-stamp-string): * vc/add-log.el (add-change-log-entry): Use setenv instead of set-time-zone-rule. * src/editfns.c (Fset_time_zone_rule): Document relationship with the setenv function. Fixes: debbugs:7337 --- src/ChangeLog | 3 +++ src/editfns.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 4df4455e862..cbe2d8659b2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-08-08 Chong Yidong + * editfns.c (Fset_time_zone_rule): Document relationship with the + setenv function. + * ftfont.c (ftfont_pattern_entity): Copy the extras argument to the font entity extracted from the cache (Bug#8109). diff --git a/src/editfns.c b/src/editfns.c index 5eed386afb7..297f7b6d7e4 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2053,7 +2053,12 @@ static char *initial_tz; DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, doc: /* Set the local time zone using TZ, a string specifying a time zone rule. If TZ is nil, use implementation-defined default time zone information. -If TZ is t, use Universal Time. */) +If TZ is t, use Universal Time. + +Instead of calling this function, you typically want (setenv "TZ" TZ). +That changes both the environment of the Emacs process and the +variable `process-environment', whereas `set-time-zone-rule' affects +only the former. */) (Lisp_Object tz) { const char *tzstring; -- cgit v1.2.1 From 97bb72a608508d9edbed86ba38d228bf6ed11eb5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 8 Aug 2011 19:57:53 +0300 Subject: Speed up bidi redisplay with selective-display. src/xdisp.c (forward_to_next_line_start): Allow to use the no-display-properties-and-no-overlays under bidi display. --- src/ChangeLog | 5 +++++ src/xdisp.c | 41 ++++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index cbe2d8659b2..193bb739766 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-08 Eli Zaretskii + + * xdisp.c (forward_to_next_line_start): Allow to use the + no-display-properties-and-no-overlays under bidi display. + 2011-08-08 Chong Yidong * editfns.c (Fset_time_zone_rule): Document relationship with the diff --git a/src/xdisp.c b/src/xdisp.c index 6e9474e3c10..2a46fe2dad5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5532,19 +5532,34 @@ forward_to_next_line_start (struct it *it, int *skipped_p, xassert (!STRINGP (it->string)); - /* If we are not bidi-reordering, and there isn't any `display' - property in sight, and no overlays, we can just use the - position of the newline in buffer text. */ - if (!it->bidi_p - && (it->stop_charpos >= limit - || ((pos = Fnext_single_property_change (make_number (start), - Qdisplay, Qnil, - make_number (limit)), - NILP (pos)) - && next_overlay_change (start) == ZV))) - { - IT_CHARPOS (*it) = limit; - IT_BYTEPOS (*it) = CHAR_TO_BYTE (limit); + /* If there isn't any `display' property in sight, and no + overlays, we can just use the position of the newline in + buffer text. */ + if (it->stop_charpos >= limit + || ((pos = Fnext_single_property_change (make_number (start), + Qdisplay, Qnil, + make_number (limit)), + NILP (pos)) + && next_overlay_change (start) == ZV)) + { + if (!it->bidi_p) + { + IT_CHARPOS (*it) = limit; + IT_BYTEPOS (*it) = CHAR_TO_BYTE (limit); + } + else + { + struct bidi_it bprev; + + do { + bprev = it->bidi_it; + bidi_move_to_visually_next (&it->bidi_it); + } while (it->bidi_it.charpos != limit); + IT_CHARPOS (*it) = limit; + IT_BYTEPOS (*it) = it->bidi_it.bytepos; + if (bidi_it_prev) + *bidi_it_prev = bprev; + } *skipped_p = newline_found_p = 1; } else -- cgit v1.2.1 From 757664a4549c35d3cf5f2f4305ba1f09ce97a6da Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 8 Aug 2011 20:37:34 +0300 Subject: Improve on previous change in xdisp.c. --- src/ChangeLog | 4 +++- src/xdisp.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 193bb739766..4d493eab7b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,9 @@ 2011-08-08 Eli Zaretskii * xdisp.c (forward_to_next_line_start): Allow to use the - no-display-properties-and-no-overlays under bidi display. + no-display-properties-and-no-overlays under bidi display. Set + disp_pos in the bidi iterator to avoid searches for display + properties and overlays. 2011-08-08 Chong Yidong diff --git a/src/xdisp.c b/src/xdisp.c index 2a46fe2dad5..1437aafef39 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5551,6 +5551,14 @@ forward_to_next_line_start (struct it *it, int *skipped_p, { struct bidi_it bprev; + /* Help bidi.c avoid expensive searches for display + properties and overlays, by telling it that there are + none up to `limit'. */ + if (it->bidi_it.disp_pos < limit) + { + it->bidi_it.disp_pos = limit; + it->bidi_it.disp_prop_p = 0; + } do { bprev = it->bidi_it; bidi_move_to_visually_next (&it->bidi_it); -- cgit v1.2.1