From 8719d1dcad924e8b00b8610cbb531fcef5fca0b5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 23 Jul 2011 17:34:51 +0300 Subject: [PATCH 1/4] src/bidi.c: Backport from trunk a bugfix for bidi_paragraph_init at EOB. --- src/bidi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bidi.c b/src/bidi.c index 3bee2009a0e..77043d9236f 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1134,10 +1134,6 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) || type == LRE || type == LRO)); type = bidi_get_type (ch, NEUTRAL_DIR)) { - if (!string_p - && type == NEUTRAL_B - && bidi_at_paragraph_end (pos, bytepos) >= -1) - break; if (pos >= end) { /* Pretend there's a paragraph separator at end of @@ -1145,6 +1141,10 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) type = NEUTRAL_B; break; } + if (!string_p + && type == NEUTRAL_B + && bidi_at_paragraph_end (pos, bytepos) >= -1) + break; /* Fetch next character and advance to get past it. */ ch = bidi_fetch_char (bytepos, pos, &disp_pos, &bidi_it->string, bidi_it->frame_window_p, &ch_len, &nchars); From 7daee9109e1d69d62528f6b460d101e1ea44f4e1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 24 Jul 2011 21:19:10 +0300 Subject: [PATCH 2/4] Fix cursor motion slowdown at the beginning of buffer. src/xdisp.c (compute_display_string_pos): Fix logic of caching previous display string position. Initialize cached_prev_pos to -1. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dd5a1fba871..8aa1237f693 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-07-24 Eli Zaretskii + + * xdisp.c (compute_display_string_pos): Fix logic of caching + previous display string position. Initialize cached_prev_pos to + -1. Fixes slow-down at the beginning of a buffer. + 2011-07-23 Eli Zaretskii * xdisp.c (move_it_in_display_line_to): Record the best matching diff --git a/src/xdisp.c b/src/xdisp.c index a5eb2aa923a..5f9e80cd11e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3140,7 +3140,7 @@ next_overlay_change (EMACS_INT pos) /* Record one cached display string position found recently by compute_display_string_pos. */ static EMACS_INT cached_disp_pos; -static EMACS_INT cached_prev_pos; +static EMACS_INT cached_prev_pos = -1; static struct buffer *cached_disp_buffer; static int cached_disp_modiff; static int cached_disp_overlay_modiff; @@ -3190,18 +3190,22 @@ compute_display_string_pos (struct text_pos *position, && BUF_MODIFF (b) == cached_disp_modiff && BUF_OVERLAY_MODIFF (b) == cached_disp_overlay_modiff) { - if (cached_prev_pos + if (cached_prev_pos >= 0 && cached_prev_pos < charpos && charpos <= cached_disp_pos) return cached_disp_pos; /* Handle overstepping either end of the known interval. */ if (charpos > cached_disp_pos) cached_prev_pos = cached_disp_pos; else /* charpos <= cached_prev_pos */ - cached_prev_pos = max (charpos - 1, BEGV); + cached_prev_pos = max (charpos - 1, 0); } /* Record new values in the cache. */ - cached_disp_buffer = b; + if (b != cached_disp_buffer) + { + cached_disp_buffer = b; + cached_prev_pos = max (charpos - 1, 0); + } cached_disp_modiff = BUF_MODIFF (b); cached_disp_overlay_modiff = BUF_OVERLAY_MODIFF (b); } From 43a0a4fab73ab14e8a1f023426a67b738505761a Mon Sep 17 00:00:00 2001 From: Andrew Cohen Date: Sun, 24 Jul 2011 22:15:15 +0000 Subject: [PATCH 3/4] nnimap.el (nnimap-make-thread-query): Quote message-ids for gmail. --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/nnimap.el | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 400abd51c27..f90e180b128 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2011-07-24 Andrew Cohen + + * nnimap.el (nnimap-make-thread-query): Quote message-ids for gmail. + 2011-07-23 Andrew Cohen * nnir.el (nnir-search-thread): New function to make an nnir group diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 8a0d635ef7b..52de48869d8 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1947,13 +1947,13 @@ textual parts.") (refs (split-string (or (mail-header-references header) ""))) - (value - (format - "(OR HEADER REFERENCES %s HEADER Message-Id %s)" - id id))) + (value + (format + "(OR HEADER REFERENCES %S HEADER Message-Id %S)" + id id))) (dolist (refid refs value) (setq value (format - "(OR (OR HEADER Message-Id %s HEADER REFERENCES %s) %s)" + "(OR (OR HEADER Message-Id %S HEADER REFERENCES %S) %s)" refid refid value))))) From 0f0a88b94cce778a7903196b07a0d70657fb4dc0 Mon Sep 17 00:00:00 2001 From: Deniz Dogan Date: Mon, 25 Jul 2011 03:44:10 +0200 Subject: [PATCH 4/4] * lisp/image.el (insert-image): Clarifying docstring. --- lisp/ChangeLog | 4 ++++ lisp/image.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f03b9b97d5..93674179121 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-07-25 Deniz Dogan + + * image.el (insert-image): Clarifying docstring. + 2011-07-24 Michael Albinus * net/tramp-sh.el (tramp-barf-unless-okay): Return the value of diff --git a/lisp/image.el b/lisp/image.el index c6862622639..30362251664 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -413,8 +413,8 @@ means display it in the right marginal area." (defun insert-image (image &optional string area slice) "Insert IMAGE into current buffer at point. IMAGE is displayed by inserting STRING into the current buffer -with a `display' property whose value is the image. STRING is -defaulted if you omit it. +with a `display' property whose value is the image. STRING +defaults to the empty string if you omit it. AREA is where to display the image. AREA nil or omitted means display it in the text area, a value of `left-margin' means display it in the left marginal area, a value of `right-margin'