aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-05-14 19:59:28 +0800
committerChong Yidong2012-05-14 19:59:28 +0800
commite18afed7d695edac870ddf55aabc85c0a95a4b5f (patch)
tree81dfa2c4b4cbc9014cb621f20eb2c5b173823a66
parentac9f0b75eb3a7fb50226cda2cfa1980c2df2b429 (diff)
parentc8fb9dc689cdd9facc56d7220bdf3bb5864231f0 (diff)
downloademacs-e18afed7d695edac870ddf55aabc85c0a95a4b5f.tar.gz
emacs-e18afed7d695edac870ddf55aabc85c0a95a4b5f.zip
Merge from emacs-24; up to 2012-04-22T13:58:00Z!cyd@gnu.org
-rw-r--r--doc/misc/ChangeLog7
-rw-r--r--doc/misc/Makefile.in2
-rw-r--r--doc/misc/cc-mode.texi23
-rw-r--r--lisp/ChangeLog24
-rw-r--r--lisp/mail/smtpmail.el3
-rw-r--r--lisp/net/rlogin.el12
-rw-r--r--lisp/shell.el5
-rw-r--r--src/ChangeLog35
-rw-r--r--src/unexaix.c2
-rw-r--r--src/xdisp.c98
10 files changed, 180 insertions, 31 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 915e85a3e68..812ec0214b0 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,10 @@
12012-05-12 Andreas Schwab <schwab@linux-m68k.org>
2
3 * cc-mode.texi: Avoid space before macro in 4th argument of cross
4 reference commands. (Bug#11461)
5
6 * Makefile.in (gnus.dvi): Use $@ instead of $*.dvi.
7
12012-05-12 Glenn Morris <rgm@gnu.org> 82012-05-12 Glenn Morris <rgm@gnu.org>
2 9
3 * Makefile.in (mostlyclean): Add more TeX intermediates. 10 * Makefile.in (mostlyclean): Add more TeX intermediates.
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 0c0a4e07b68..c3bbfbb02ad 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -415,7 +415,7 @@ $(infodir)/gnus$(INFO_EXT): ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
415gnus.dvi: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi 415gnus.dvi: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
416 sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi 416 sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
417 $(ENVADD) $(TEXI2DVI) gnustmp.texi 417 $(ENVADD) $(TEXI2DVI) gnustmp.texi
418 cp gnustmp.dvi $*.dvi 418 cp gnustmp.dvi $@
419 rm gnustmp.* 419 rm gnustmp.*
420gnus.pdf: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi 420gnus.pdf: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
421 sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi 421 sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 58420bbd99c..8c574be8f2a 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -701,7 +701,7 @@ in some circumstances---@code{c-insert-tab-function} then defines
701precisely what sort of ``whitespace'' this will be. Set the standard 701precisely what sort of ``whitespace'' this will be. Set the standard
702Emacs variable @code{indent-tabs-mode} to @code{t} if you want real 702Emacs variable @code{indent-tabs-mode} to @code{t} if you want real
703@samp{tab} characters to be used in the indentation, to @code{nil} if 703@samp{tab} characters to be used in the indentation, to @code{nil} if
704you want only spaces. @xref{Just Spaces,,, @emacsman{}, 704you want only spaces. @xref{Just Spaces,,,@emacsman{},
705@emacsmantitle{}}. 705@emacsmantitle{}}.
706 706
707@defopt c-tab-always-indent 707@defopt c-tab-always-indent
@@ -1058,8 +1058,8 @@ set this up for you, so you probably won't have to bother.
1058@cindex Auto Fill mode 1058@cindex Auto Fill mode
1059@cindex paragraph filling 1059@cindex paragraph filling
1060Line breaks are by default handled (almost) the same regardless of 1060Line breaks are by default handled (almost) the same regardless of
1061whether they are made by auto fill mode (@pxref{Auto Fill,,, 1061whether they are made by auto fill mode (@pxref{Auto
1062@emacsman{}, @emacsmantitle{}}), by paragraph filling (e.g. with 1062Fill,,,@emacsman{}, @emacsmantitle{}}), by paragraph filling (e.g. with
1063@kbd{M-q}), or explicitly with @kbd{M-j} or similar methods. In 1063@kbd{M-q}), or explicitly with @kbd{M-j} or similar methods. In
1064string literals, the new line gets the same indentation as the 1064string literals, the new line gets the same indentation as the
1065previous nonempty line.@footnote{You can change this default by 1065previous nonempty line.@footnote{You can change this default by
@@ -1402,7 +1402,7 @@ continuation of the preceding @code{if}.
1402@vindex abbrev-mode 1402@vindex abbrev-mode
1403@findex abbrev-mode 1403@findex abbrev-mode
1404@cindex Abbrev mode 1404@cindex Abbrev mode
1405@ccmode{} uses Abbrev mode (@pxref{Abbrevs,,, @emacsman{}, @emacsmantitle{}}) 1405@ccmode{} uses Abbrev mode (@pxref{Abbrevs,,,@emacsman{}, @emacsmantitle{}})
1406to accomplish this. It's therefore turned on by default in all language 1406to accomplish this. It's therefore turned on by default in all language
1407modes except IDL mode, since CORBA IDL doesn't have any statements. 1407modes except IDL mode, since CORBA IDL doesn't have any statements.
1408@end deffn 1408@end deffn
@@ -2295,14 +2295,14 @@ to create them.
2295A @dfn{file local variable setting} is a setting which applies to an 2295A @dfn{file local variable setting} is a setting which applies to an
2296individual source file. You put this in a @dfn{local variables list}, 2296individual source file. You put this in a @dfn{local variables list},
2297a special block at the end of the source file (@pxref{Specifying File 2297a special block at the end of the source file (@pxref{Specifying File
2298Variables,,, @emacsman{}}). 2298Variables,,,@emacsman{}}).
2299 2299
2300@item File Styles 2300@item File Styles
2301A @dfn{file style} is a rarely used variant of the ``style'' mechanism 2301A @dfn{file style} is a rarely used variant of the ``style'' mechanism
2302described above, which applies to an individual source file. 2302described above, which applies to an individual source file.
2303@xref{File Styles}. You use this by setting certain special variables 2303@xref{File Styles}. You use this by setting certain special variables
2304in a local variables list (@pxref{Specifying File Variables,,, 2304in a local variables list (@pxref{Specifying File
2305@emacsman{}}). 2305Variables,,,@emacsman{}}).
2306 2306
2307@item Hooks with Styles 2307@item Hooks with Styles
2308For ultimate flexibility, you can use hooks and styles together. For 2308For ultimate flexibility, you can use hooks and styles together. For
@@ -2897,7 +2897,7 @@ these offsets or the parent style name.
2897 2897
2898The Emacs manual describes how you can customize certain variables on a 2898The Emacs manual describes how you can customize certain variables on a
2899per-file basis by including a @dfn{file local variable} block at the end 2899per-file basis by including a @dfn{file local variable} block at the end
2900of the file (@pxref{File Variables,, Local Variables in Files, @emacsman{}, 2900of the file (@pxref{File Variables,, Local Variables in Files,@emacsman{},
2901@emacsmantitle{}}). 2901@emacsmantitle{}}).
2902 2902
2903So far, you've only seen a functional interface for setting styles in 2903So far, you've only seen a functional interface for setting styles in
@@ -3139,8 +3139,9 @@ results in the current implementation.
3139@end defopt 3139@end defopt
3140 3140
3141@vindex comment-multi-line 3141@vindex comment-multi-line
3142If inside a comment and @code{comment-multi-line} (@pxref{Auto Fill,,, 3142If inside a comment and @code{comment-multi-line} (@pxref{Auto
3143@emacsman{}, @emacsmantitle{}} is non-@code{nil}, the indentation and 3143Fill,,,@emacsman{}, @emacsmantitle{}} is non-@code{nil}, the
3144indentation and
3144line prefix are preserved. If inside a comment and 3145line prefix are preserved. If inside a comment and
3145@code{comment-multi-line} is @code{nil}, a new comment of the same 3146@code{comment-multi-line} is @code{nil}, a new comment of the same
3146type is started on the next line and indented as appropriate for 3147type is started on the next line and indented as appropriate for
@@ -6771,7 +6772,7 @@ The stuff that didn't fit in anywhere else is documented here.
6771Controls whether a final newline is enforced when the file is saved. 6772Controls whether a final newline is enforced when the file is saved.
6772The value is an association list that for each language mode specifies 6773The value is an association list that for each language mode specifies
6773the value to give to @code{require-final-newline} (@pxref{Saving 6774the value to give to @code{require-final-newline} (@pxref{Saving
6774Buffers,,, @lispref{}, @lispreftitle{}}) at mode initialization. If a 6775Buffers,,,@lispref{}, @lispreftitle{}}) at mode initialization. If a
6775language isn't present on the association list, CC Mode won't touch 6776language isn't present on the association list, CC Mode won't touch
6776@code{require-final-newline} in buffers for that language. 6777@code{require-final-newline} in buffers for that language.
6777 6778
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 75fc7f5884d..b833e61bfa2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,28 @@
12012-05-14 Troels Nielsen <bn.troels@gmail.com> (tiny change)
2
3 * progmodes/compile.el (compilation-internal-error-properties):
4 Calculate start position correctly when end-col is set but
5 end-line is not (Bug#11382).
6
72012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
8
9 * net/rlogin.el (rlogin-mode-map): Fix last change.
10
112012-05-14 Jason L. Wright <jason.wright@inl.gov> (tiny change)
12
13 * mail/smtpmail.el (smtpmail-send-command): Send the command and
14 the following \r\n using a single `process-send-string', since the
15 Lotus SMTP server refuses to accept any commands if they are sent
16 with two `process-send-string's (Bug#11444).
17
182012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
19
20 * shell.el (shell-parse-pcomplete-arguments): Obey
21 pcomplete-arg-quote-list inside double-quoted args (Bug#11348).
22
12012-05-14 Wolfgang Jenkner <wjenkner@inode.at> 232012-05-14 Wolfgang Jenkner <wjenkner@inode.at>
2 24
3 * image-mode.el: Fit to width/height for rotated images (bug#11431). 25 * image-mode.el: Fit to width/height for rotated images (Bug#11431).
4 (image-transform-scale, image-transform-right-angle-fudge): New vars. 26 (image-transform-scale, image-transform-right-angle-fudge): New vars.
5 (image-transform-width, image-transform-fit-width): New functions. 27 (image-transform-width, image-transform-fit-width): New functions.
6 (image-transform-properties): Use them. 28 (image-transform-properties): Use them.
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 8e96e2c9438..804fe7a8798 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -932,8 +932,7 @@ Returns an error if the server cannot be contacted."
932 (insert (match-string 0 command) "<omitted>\r\n") 932 (insert (match-string 0 command) "<omitted>\r\n")
933 (insert command "\r\n")) 933 (insert command "\r\n"))
934 (setq smtpmail-read-point (point)) 934 (setq smtpmail-read-point (point))
935 (process-send-string process command) 935 (process-send-string process (concat command "\r\n")))
936 (process-send-string process "\r\n"))
937 936
938(defun smtpmail-send-data-1 (process data) 937(defun smtpmail-send-data-1 (process data)
939 (goto-char (point-max)) 938 (goto-char (point-max))
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index ac936ee1429..cef615dc320 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -114,12 +114,12 @@ this variable is set from that."
114 (let ((map (if (consp shell-mode-map) 114 (let ((map (if (consp shell-mode-map)
115 (cons 'keymap shell-mode-map) 115 (cons 'keymap shell-mode-map)
116 (copy-keymap shell-mode-map)))) 116 (copy-keymap shell-mode-map))))
117 (define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C) 117 (define-key map "\C-c\C-c" 'rlogin-send-Ctrl-C)
118 (define-key rlogin-mode-map "\C-c\C-d" 'rlogin-send-Ctrl-D) 118 (define-key map "\C-c\C-d" 'rlogin-send-Ctrl-D)
119 (define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z) 119 (define-key map "\C-c\C-z" 'rlogin-send-Ctrl-Z)
120 (define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash) 120 (define-key map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash)
121 (define-key rlogin-mode-map "\C-d" 'rlogin-delchar-or-send-Ctrl-D) 121 (define-key map "\C-d" 'rlogin-delchar-or-send-Ctrl-D)
122 (define-key rlogin-mode-map "\C-i" 'rlogin-tab-or-complete) 122 (define-key map "\C-i" 'rlogin-tab-or-complete)
123 map) 123 map)
124 "Keymap for `rlogin-mode'.") 124 "Keymap for `rlogin-mode'.")
125 125
diff --git a/lisp/shell.el b/lisp/shell.el
index f7a530102ff..1784188f6ad 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -400,8 +400,9 @@ Thus, this does not include the shell's current directory.")
400 (t (match-string 3))) 400 (t (match-string 3)))
401 arg)) 401 arg))
402 ((match-beginning 2) ;Double quote. 402 ((match-beginning 2) ;Double quote.
403 (push (replace-regexp-in-string 403 (push (if (null pcomplete-arg-quote-list) (match-string 2)
404 "\\\\\\(.\\)" "\\1" (match-string 2)) 404 (replace-regexp-in-string
405 "\\\\\\(.\\)" "\\1" (match-string 2)))
405 arg)) 406 arg))
406 ((match-beginning 1) ;Single quote. 407 ((match-beginning 1) ;Single quote.
407 (push (match-string 1) arg)) 408 (push (match-string 1) arg))
diff --git a/src/ChangeLog b/src/ChangeLog
index 8b29c10c38d..3f9d575dce2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,38 @@
12012-05-14 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
4 already have overlays loaded.
5 (handle_single_display_spec): Before returning without displaying
6 fringe bitmap, synchronize the bidi iterator with the main display
7 iterator, by calling iterate_out_of_display_property.
8 (iterate_out_of_display_property): Detect buffer iteration by
9 testing that it->string is a Lisp string.
10 (get_next_display_element): When the current object is exhausted,
11 and there's something on it->stack, call set_iterator_to_next to
12 proceed with what's on the stack, instead of returning zero.
13 (set_iterator_to_next): If called at the end of a Lisp string,
14 proceed to consider_string_end without incrementing string
15 position. Don't increment display vector index past the end of
16 the display vector. (Bug#11417)
17 (pos_visible_p): Don't report a position visible when move_it_to
18 stopped at the last line of window, which happens to be scanned
19 backwards by the bidi iteration. (Bug#11464)
20
212012-05-14 Eli Zaretskii <eliz@gnu.org>
22
23 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
24 and right-margin display specs even if the spec is invalid or we
25 are on a TTY, and thus unable to display on the fringes. That's
26 because the text with the property will not be displayed anyway,
27 so we need to signal to the caller that this is a "replacing"
28 display spec. This fixes display when the spec is invalid or we
29 are on a TTY.
30
312012-05-14 Paul Eggert <eggert@cs.ucla.edu>
32
33 * unexaix.c (make_hdr): Fix typo in prototype.
34 This bug broke the build on AIX. Problem reported by Gilles Pion.
35
12012-05-14 Michael Albinus <michael.albinus@gmx.de> 362012-05-14 Michael Albinus <michael.albinus@gmx.de>
2 37
3 * keyboard.c (kbd_buffer_get_event): Read special events also in 38 * keyboard.c (kbd_buffer_get_event): Read special events also in
diff --git a/src/unexaix.c b/src/unexaix.c
index 1bf65b68518..e27fb1d136d 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -110,7 +110,7 @@ report_error_1 (int fd, char *msg, int a1, int a2)
110 error (msg, a1, a2); 110 error (msg, a1, a2);
111} 111}
112 112
113static int make_hdr (int, int, unsigned, unsigned, unsigned, char *, char *); 113static int make_hdr (int, int, char *, char *);
114static void mark_x (char *); 114static void mark_x (char *);
115static int copy_text_and_data (int); 115static int copy_text_and_data (int);
116static int copy_sym (int, int, char *, char *); 116static int copy_sym (int, int, char *, char *);
diff --git a/src/xdisp.c b/src/xdisp.c
index 36ca69956d4..e7ecd2c1d91 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -849,6 +849,7 @@ static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
849static int trailing_whitespace_p (EMACS_INT); 849static int trailing_whitespace_p (EMACS_INT);
850static intmax_t message_log_check_duplicate (EMACS_INT, EMACS_INT); 850static intmax_t message_log_check_duplicate (EMACS_INT, EMACS_INT);
851static void push_it (struct it *, struct text_pos *); 851static void push_it (struct it *, struct text_pos *);
852static void iterate_out_of_display_property (struct it *);
852static void pop_it (struct it *); 853static void pop_it (struct it *);
853static void sync_frame_with_window_matrix_rows (struct window *); 854static void sync_frame_with_window_matrix_rows (struct window *);
854static void select_frame_for_redisplay (Lisp_Object); 855static void select_frame_for_redisplay (Lisp_Object);
@@ -1313,8 +1314,8 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
1313 glyph. */ 1314 glyph. */
1314 int top_x = it.current_x; 1315 int top_x = it.current_x;
1315 int top_y = it.current_y; 1316 int top_y = it.current_y;
1316 enum it_method it_method = it.method;
1317 /* Calling line_bottom_y may change it.method, it.position, etc. */ 1317 /* Calling line_bottom_y may change it.method, it.position, etc. */
1318 enum it_method it_method = it.method;
1318 int bottom_y = (last_height = 0, line_bottom_y (&it)); 1319 int bottom_y = (last_height = 0, line_bottom_y (&it));
1319 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); 1320 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
1320 1321
@@ -1322,6 +1323,31 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
1322 visible_p = bottom_y > window_top_y; 1323 visible_p = bottom_y > window_top_y;
1323 else if (top_y < it.last_visible_y) 1324 else if (top_y < it.last_visible_y)
1324 visible_p = 1; 1325 visible_p = 1;
1326 if (bottom_y >= it.last_visible_y
1327 && it.bidi_p && it.bidi_it.scan_dir == -1
1328 && IT_CHARPOS (it) < charpos)
1329 {
1330 /* When the last line of the window is scanned backwards
1331 under bidi iteration, we could be duped into thinking
1332 that we have passed CHARPOS, when in fact move_it_to
1333 simply stopped short of CHARPOS because it reached
1334 last_visible_y. To see if that's what happened, we call
1335 move_it_to again with a slightly larger vertical limit,
1336 and see if it actually moved vertically; if it did, we
1337 didn't really reach CHARPOS, which is beyond window end. */
1338 struct it save_it = it;
1339 /* Why 10? because we don't know how many canonical lines
1340 will the height of the next line(s) be. So we guess. */
1341 int ten_more_lines =
1342 10 * FRAME_LINE_HEIGHT (XFRAME (WINDOW_FRAME (w)));
1343
1344 move_it_to (&it, charpos, -1, bottom_y + ten_more_lines, -1,
1345 MOVE_TO_POS | MOVE_TO_Y);
1346 if (it.current_y > top_y)
1347 visible_p = 0;
1348
1349 it = save_it;
1350 }
1325 if (visible_p) 1351 if (visible_p)
1326 { 1352 {
1327 if (it_method == GET_FROM_DISPLAY_VECTOR) 1353 if (it_method == GET_FROM_DISPLAY_VECTOR)
@@ -3135,7 +3161,15 @@ handle_stop (struct it *it)
3135 overlays even if the actual buffer text is replaced. */ 3161 overlays even if the actual buffer text is replaced. */
3136 if (!handle_overlay_change_p 3162 if (!handle_overlay_change_p
3137 || it->sp > 1 3163 || it->sp > 1
3138 || !get_overlay_strings_1 (it, 0, 0)) 3164 /* Don't call get_overlay_strings_1 if we already
3165 have overlay strings loaded, because doing so
3166 will load them again and push the iterator state
3167 onto the stack one more time, which is not
3168 expected by the rest of the code that processes
3169 overlay strings. */
3170 || (it->n_overlay_strings <= 0
3171 ? !get_overlay_strings_1 (it, 0, 0)
3172 : 0))
3139 { 3173 {
3140 if (it->ellipsis_p) 3174 if (it->ellipsis_p)
3141 setup_for_ellipsis (it, 0); 3175 setup_for_ellipsis (it, 0);
@@ -4691,10 +4725,22 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
4691 if (!FRAME_WINDOW_P (it->f)) 4725 if (!FRAME_WINDOW_P (it->f))
4692 /* If we return here, POSITION has been advanced 4726 /* If we return here, POSITION has been advanced
4693 across the text with this property. */ 4727 across the text with this property. */
4694 return 0; 4728 {
4729 /* Synchronize the bidi iterator with POSITION. This is
4730 needed because we are not going to push the iterator
4731 on behalf of this display property, so there will be
4732 no pop_it call to do this synchronization for us. */
4733 if (it->bidi_p)
4734 {
4735 it->position = *position;
4736 iterate_out_of_display_property (it);
4737 *position = it->position;
4738 }
4739 return 1;
4740 }
4695 } 4741 }
4696 else if (!frame_window_p) 4742 else if (!frame_window_p)
4697 return 0; 4743 return 1;
4698 4744
4699#ifdef HAVE_WINDOW_SYSTEM 4745#ifdef HAVE_WINDOW_SYSTEM
4700 value = XCAR (XCDR (spec)); 4746 value = XCAR (XCDR (spec));
@@ -4702,7 +4748,15 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
4702 || !(fringe_bitmap = lookup_fringe_bitmap (value))) 4748 || !(fringe_bitmap = lookup_fringe_bitmap (value)))
4703 /* If we return here, POSITION has been advanced 4749 /* If we return here, POSITION has been advanced
4704 across the text with this property. */ 4750 across the text with this property. */
4705 return 0; 4751 {
4752 if (it && it->bidi_p)
4753 {
4754 it->position = *position;
4755 iterate_out_of_display_property (it);
4756 *position = it->position;
4757 }
4758 return 1;
4759 }
4706 4760
4707 if (it) 4761 if (it)
4708 { 4762 {
@@ -5621,7 +5675,7 @@ push_it (struct it *it, struct text_pos *position)
5621static void 5675static void
5622iterate_out_of_display_property (struct it *it) 5676iterate_out_of_display_property (struct it *it)
5623{ 5677{
5624 int buffer_p = BUFFERP (it->object); 5678 int buffer_p = !STRINGP (it->string);
5625 EMACS_INT eob = (buffer_p ? ZV : it->end_charpos); 5679 EMACS_INT eob = (buffer_p ? ZV : it->end_charpos);
5626 EMACS_INT bob = (buffer_p ? BEGV : 0); 5680 EMACS_INT bob = (buffer_p ? BEGV : 0);
5627 5681
@@ -6790,6 +6844,16 @@ get_next_display_element (struct it *it)
6790 && FACE_FROM_ID (it->f, face_id)->box == FACE_NO_BOX); 6844 && FACE_FROM_ID (it->f, face_id)->box == FACE_NO_BOX);
6791 } 6845 }
6792 } 6846 }
6847 /* If we reached the end of the object we've been iterating (e.g., a
6848 display string or an overlay string), and there's something on
6849 IT->stack, proceed with what's on the stack. It doesn't make
6850 sense to return zero if there's unprocessed stuff on the stack,
6851 because otherwise that stuff will never be displayed. */
6852 if (!success_p && it->sp > 0)
6853 {
6854 set_iterator_to_next (it, 0);
6855 success_p = get_next_display_element (it);
6856 }
6793 6857
6794 /* Value is 0 if end of buffer or string reached. */ 6858 /* Value is 0 if end of buffer or string reached. */
6795 return success_p; 6859 return success_p;
@@ -6971,7 +7035,7 @@ set_iterator_to_next (struct it *it, int reseat_p)
6971 display vector entry (these entries may contain faces). */ 7035 display vector entry (these entries may contain faces). */
6972 it->face_id = it->saved_face_id; 7036 it->face_id = it->saved_face_id;
6973 7037
6974 if (it->dpvec + it->current.dpvec_index == it->dpend) 7038 if (it->dpvec + it->current.dpvec_index >= it->dpend)
6975 { 7039 {
6976 int recheck_faces = it->ellipsis_p; 7040 int recheck_faces = it->ellipsis_p;
6977 7041
@@ -7009,6 +7073,26 @@ set_iterator_to_next (struct it *it, int reseat_p)
7009 case GET_FROM_STRING: 7073 case GET_FROM_STRING:
7010 /* Current display element is a character from a Lisp string. */ 7074 /* Current display element is a character from a Lisp string. */
7011 xassert (it->s == NULL && STRINGP (it->string)); 7075 xassert (it->s == NULL && STRINGP (it->string));
7076 /* Don't advance past string end. These conditions are true
7077 when set_iterator_to_next is called at the end of
7078 get_next_display_element, in which case the Lisp string is
7079 already exhausted, and all we want is pop the iterator
7080 stack. */
7081 if (it->current.overlay_string_index >= 0)
7082 {
7083 /* This is an overlay string, so there's no padding with
7084 spaces, and the number of characters in the string is
7085 where the string ends. */
7086 if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string))
7087 goto consider_string_end;
7088 }
7089 else
7090 {
7091 /* Not an overlay string. There could be padding, so test
7092 against it->end_charpos . */
7093 if (IT_STRING_CHARPOS (*it) >= it->end_charpos)
7094 goto consider_string_end;
7095 }
7012 if (it->cmp_it.id >= 0) 7096 if (it->cmp_it.id >= 0)
7013 { 7097 {
7014 int i; 7098 int i;