aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-11-01 23:13:15 -0700
committerPaul Eggert2011-11-01 23:13:15 -0700
commit3616c8b26bfaf024d803371b85bee571cd6f061f (patch)
treebd7b5e6e3560b0496c144b13b44c1917cb9de8dc /src
parent5b0d046d5b6a6743be6888d02352b878151e1d6c (diff)
parentdb22a3c27b078148c26a9f50afca5454a68d37d1 (diff)
downloademacs-3616c8b26bfaf024d803371b85bee571cd6f061f.tar.gz
emacs-3616c8b26bfaf024d803371b85bee571cd6f061f.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/window.c15
-rw-r--r--src/xdisp.c50
3 files changed, 40 insertions, 41 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0b4da8f5e40..eb71bfc62ed 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
12011-10-29 Paul Eggert <eggert@cs.ucla.edu> 12011-11-02 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix integer width and related bugs (Bug#9874). 3 Fix integer width and related bugs (Bug#9874).
4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp): 4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -786,6 +786,20 @@
786 rather than rolling our own approximation. 786 rather than rolling our own approximation.
787 (SCROLL_BAR_VEC_SIZE): Remove; not used. 787 (SCROLL_BAR_VEC_SIZE): Remove; not used.
788 788
7892011-11-01 Eli Zaretskii <eliz@gnu.org>
790
791 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
792 Don't stop backward scan on the continuation glyph, even though
793 its CHARPOS is positive.
794 (mouse_face_from_buffer_pos, note_mouse_highlight): Rename
795 cover_string to disp_string.
796
7972011-11-01 Martin Rudalics <rudalics@gmx.at>
798
799 * window.c (temp_output_buffer_show): Don't use
800 Vtemp_buffer_show_specifiers.
801 (Vtemp_buffer_show_specifiers): Remove unused variable.
802
7892011-10-30 Eli Zaretskii <eliz@gnu.org> 8032011-10-30 Eli Zaretskii <eliz@gnu.org>
790 804
791 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented 805 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
diff --git a/src/window.c b/src/window.c
index d9ef9d090ae..5ed7db2c916 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3186,10 +3186,7 @@ temp_output_buffer_show (register Lisp_Object buf)
3186 call1 (Vtemp_buffer_show_function, buf); 3186 call1 (Vtemp_buffer_show_function, buf);
3187 else 3187 else
3188 { 3188 {
3189 window = display_buffer (buf, Vtemp_buffer_show_specifiers, Qnil); 3189 window = display_buffer (buf, Qnil, Qnil);
3190 /* Reset Vtemp_buffer_show_specifiers immediately so it won't
3191 affect subsequent calls. */
3192 Vtemp_buffer_show_specifiers = Qnil;
3193 3190
3194 if (!EQ (XWINDOW (window)->frame, selected_frame)) 3191 if (!EQ (XWINDOW (window)->frame, selected_frame))
3195 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); 3192 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
@@ -6462,16 +6459,6 @@ If this function is used, then it must do the entire job of showing
6462the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */); 6459the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */);
6463 Vtemp_buffer_show_function = Qnil; 6460 Vtemp_buffer_show_function = Qnil;
6464 6461
6465 DEFVAR_LISP ("temp-buffer-show-specifiers", Vtemp_buffer_show_specifiers,
6466 doc: /* Buffer display specifiers used by `with-output-to-temp-buffer'.
6467These specifiers are passed by `with-output-to-temp-buffer' as second
6468argument to `display-buffer'. Applications should only let-bind this
6469around a call to `with-output-to-temp-buffer'.
6470
6471For a description of buffer display specifiers see the variable
6472`display-buffer-alist'. */);
6473 Vtemp_buffer_show_specifiers = Qnil;
6474
6475 DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window, 6462 DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window,
6476 doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); 6463 doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */);
6477 Vminibuf_scroll_window = Qnil; 6464 Vminibuf_scroll_window = Qnil;
diff --git a/src/xdisp.c b/src/xdisp.c
index a177a8aca87..698f217f240 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -25813,7 +25813,7 @@ rows_from_pos_range (struct window *w,
25813 for the overlay or run of text properties specifying the mouse 25813 for the overlay or run of text properties specifying the mouse
25814 face. BEFORE_STRING and AFTER_STRING, if non-nil, are a 25814 face. BEFORE_STRING and AFTER_STRING, if non-nil, are a
25815 before-string and after-string that must also be highlighted. 25815 before-string and after-string that must also be highlighted.
25816 COVER_STRING, if non-nil, is a display string that may cover some 25816 DISP_STRING, if non-nil, is a display string that may cover some
25817 or all of the highlighted text. */ 25817 or all of the highlighted text. */
25818 25818
25819static void 25819static void
@@ -25824,7 +25824,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25824 ptrdiff_t end_charpos, 25824 ptrdiff_t end_charpos,
25825 Lisp_Object before_string, 25825 Lisp_Object before_string,
25826 Lisp_Object after_string, 25826 Lisp_Object after_string,
25827 Lisp_Object cover_string) 25827 Lisp_Object disp_string)
25828{ 25828{
25829 struct window *w = XWINDOW (window); 25829 struct window *w = XWINDOW (window);
25830 struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); 25830 struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
@@ -25833,7 +25833,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25833 ptrdiff_t ignore, pos; 25833 ptrdiff_t ignore, pos;
25834 int x; 25834 int x;
25835 25835
25836 xassert (NILP (cover_string) || STRINGP (cover_string)); 25836 xassert (NILP (disp_string) || STRINGP (disp_string));
25837 xassert (NILP (before_string) || STRINGP (before_string)); 25837 xassert (NILP (before_string) || STRINGP (before_string));
25838 xassert (NILP (after_string) || STRINGP (after_string)); 25838 xassert (NILP (after_string) || STRINGP (after_string));
25839 25839
@@ -25843,7 +25843,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25843 r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); 25843 r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
25844 /* If the before-string or display-string contains newlines, 25844 /* If the before-string or display-string contains newlines,
25845 rows_from_pos_range skips to its last row. Move back. */ 25845 rows_from_pos_range skips to its last row. Move back. */
25846 if (!NILP (before_string) || !NILP (cover_string)) 25846 if (!NILP (before_string) || !NILP (disp_string))
25847 { 25847 {
25848 struct glyph_row *prev; 25848 struct glyph_row *prev;
25849 while ((prev = r1 - 1, prev >= first) 25849 while ((prev = r1 - 1, prev >= first)
@@ -25855,7 +25855,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25855 while (--glyph >= beg && INTEGERP (glyph->object)); 25855 while (--glyph >= beg && INTEGERP (glyph->object));
25856 if (glyph < beg 25856 if (glyph < beg
25857 || !(EQ (glyph->object, before_string) 25857 || !(EQ (glyph->object, before_string)
25858 || EQ (glyph->object, cover_string))) 25858 || EQ (glyph->object, disp_string)))
25859 break; 25859 break;
25860 r1 = prev; 25860 r1 = prev;
25861 } 25861 }
@@ -25880,10 +25880,10 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25880 r2 = next; 25880 r2 = next;
25881 } 25881 }
25882 /* The rest of the display engine assumes that mouse_face_beg_row is 25882 /* The rest of the display engine assumes that mouse_face_beg_row is
25883 either above below mouse_face_end_row or identical to it. But 25883 either above mouse_face_end_row or identical to it. But with
25884 with bidi-reordered continued lines, the row for START_CHARPOS 25884 bidi-reordered continued lines, the row for START_CHARPOS could
25885 could be below the row for END_CHARPOS. If so, swap the rows and 25885 be below the row for END_CHARPOS. If so, swap the rows and store
25886 store them in correct order. */ 25886 them in correct order. */
25887 if (r1->y > r2->y) 25887 if (r1->y > r2->y)
25888 { 25888 {
25889 struct glyph_row *tem = r2; 25889 struct glyph_row *tem = r2;
@@ -25898,7 +25898,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25898 hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); 25898 hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix);
25899 25899
25900 /* For a bidi-reordered row, the positions of BEFORE_STRING, 25900 /* For a bidi-reordered row, the positions of BEFORE_STRING,
25901 AFTER_STRING, COVER_STRING, START_CHARPOS, and END_CHARPOS 25901 AFTER_STRING, DISP_STRING, START_CHARPOS, and END_CHARPOS
25902 could be anywhere in the row and in any order. The strategy 25902 could be anywhere in the row and in any order. The strategy
25903 below is to find the leftmost and the rightmost glyph that 25903 below is to find the leftmost and the rightmost glyph that
25904 belongs to either of these 3 strings, or whose position is 25904 belongs to either of these 3 strings, or whose position is
@@ -25924,11 +25924,11 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25924 x += glyph->pixel_width; 25924 x += glyph->pixel_width;
25925 25925
25926 /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, 25926 /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
25927 or COVER_STRING, and the first glyph from buffer whose 25927 or DISP_STRING, and the first glyph from buffer whose
25928 position is between START_CHARPOS and END_CHARPOS. */ 25928 position is between START_CHARPOS and END_CHARPOS. */
25929 for (; glyph < end 25929 for (; glyph < end
25930 && !INTEGERP (glyph->object) 25930 && !INTEGERP (glyph->object)
25931 && !EQ (glyph->object, cover_string) 25931 && !EQ (glyph->object, disp_string)
25932 && !(BUFFERP (glyph->object) 25932 && !(BUFFERP (glyph->object)
25933 && (glyph->charpos >= start_charpos 25933 && (glyph->charpos >= start_charpos
25934 && glyph->charpos < end_charpos)); 25934 && glyph->charpos < end_charpos));
@@ -25975,11 +25975,11 @@ mouse_face_from_buffer_pos (Lisp_Object window,
25975 ; 25975 ;
25976 25976
25977 /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, 25977 /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
25978 or COVER_STRING, and the first glyph from buffer whose 25978 or DISP_STRING, and the first glyph from buffer whose
25979 position is between START_CHARPOS and END_CHARPOS. */ 25979 position is between START_CHARPOS and END_CHARPOS. */
25980 for (; glyph > end 25980 for (; glyph > end
25981 && !INTEGERP (glyph->object) 25981 && !INTEGERP (glyph->object)
25982 && !EQ (glyph->object, cover_string) 25982 && !EQ (glyph->object, disp_string)
25983 && !(BUFFERP (glyph->object) 25983 && !(BUFFERP (glyph->object)
25984 && (glyph->charpos >= start_charpos 25984 && (glyph->charpos >= start_charpos
25985 && glyph->charpos < end_charpos)); 25985 && glyph->charpos < end_charpos));
@@ -26035,17 +26035,16 @@ mouse_face_from_buffer_pos (Lisp_Object window,
26035 row, and also blanks and stretch glyphs inserted by 26035 row, and also blanks and stretch glyphs inserted by
26036 extend_face_to_end_of_line. */ 26036 extend_face_to_end_of_line. */
26037 while (end > glyph 26037 while (end > glyph
26038 && INTEGERP ((end - 1)->object) 26038 && INTEGERP ((end - 1)->object))
26039 && (end - 1)->charpos <= 0)
26040 --end; 26039 --end;
26041 /* Scan the rest of the glyph row from the end, looking for the 26040 /* Scan the rest of the glyph row from the end, looking for the
26042 first glyph that comes from BEFORE_STRING, AFTER_STRING, or 26041 first glyph that comes from BEFORE_STRING, AFTER_STRING, or
26043 COVER_STRING, or whose position is between START_CHARPOS 26042 DISP_STRING, or whose position is between START_CHARPOS
26044 and END_CHARPOS */ 26043 and END_CHARPOS */
26045 for (--end; 26044 for (--end;
26046 end > glyph 26045 end > glyph
26047 && !INTEGERP (end->object) 26046 && !INTEGERP (end->object)
26048 && !EQ (end->object, cover_string) 26047 && !EQ (end->object, disp_string)
26049 && !(BUFFERP (end->object) 26048 && !(BUFFERP (end->object)
26050 && (end->charpos >= start_charpos 26049 && (end->charpos >= start_charpos
26051 && end->charpos < end_charpos)); 26050 && end->charpos < end_charpos));
@@ -26082,20 +26081,19 @@ mouse_face_from_buffer_pos (Lisp_Object window,
26082 x = r2->x; 26081 x = r2->x;
26083 end++; 26082 end++;
26084 while (end < glyph 26083 while (end < glyph
26085 && INTEGERP (end->object) 26084 && INTEGERP (end->object))
26086 && end->charpos <= 0)
26087 { 26085 {
26088 x += end->pixel_width; 26086 x += end->pixel_width;
26089 ++end; 26087 ++end;
26090 } 26088 }
26091 /* Scan the rest of the glyph row from the end, looking for the 26089 /* Scan the rest of the glyph row from the end, looking for the
26092 first glyph that comes from BEFORE_STRING, AFTER_STRING, or 26090 first glyph that comes from BEFORE_STRING, AFTER_STRING, or
26093 COVER_STRING, or whose position is between START_CHARPOS 26091 DISP_STRING, or whose position is between START_CHARPOS
26094 and END_CHARPOS */ 26092 and END_CHARPOS */
26095 for ( ; 26093 for ( ;
26096 end < glyph 26094 end < glyph
26097 && !INTEGERP (end->object) 26095 && !INTEGERP (end->object)
26098 && !EQ (end->object, cover_string) 26096 && !EQ (end->object, disp_string)
26099 && !(BUFFERP (end->object) 26097 && !(BUFFERP (end->object)
26100 && (end->charpos >= start_charpos 26098 && (end->charpos >= start_charpos
26101 && end->charpos < end_charpos)); 26099 && end->charpos < end_charpos));
@@ -27092,7 +27090,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
27092 /* The mouse-highlighting, if any, comes from an overlay 27090 /* The mouse-highlighting, if any, comes from an overlay
27093 or text property in the buffer. */ 27091 or text property in the buffer. */
27094 Lisp_Object buffer IF_LINT (= Qnil); 27092 Lisp_Object buffer IF_LINT (= Qnil);
27095 Lisp_Object cover_string IF_LINT (= Qnil); 27093 Lisp_Object disp_string IF_LINT (= Qnil);
27096 27094
27097 if (STRINGP (object)) 27095 if (STRINGP (object))
27098 { 27096 {
@@ -27106,13 +27104,13 @@ note_mouse_highlight (struct frame *f, int x, int y)
27106 mouse_face = get_char_property_and_overlay 27104 mouse_face = get_char_property_and_overlay
27107 (make_number (pos), Qmouse_face, w->buffer, &overlay); 27105 (make_number (pos), Qmouse_face, w->buffer, &overlay);
27108 buffer = w->buffer; 27106 buffer = w->buffer;
27109 cover_string = object; 27107 disp_string = object;
27110 } 27108 }
27111 } 27109 }
27112 else 27110 else
27113 { 27111 {
27114 buffer = object; 27112 buffer = object;
27115 cover_string = Qnil; 27113 disp_string = Qnil;
27116 } 27114 }
27117 27115
27118 if (!NILP (mouse_face)) 27116 if (!NILP (mouse_face))
@@ -27164,7 +27162,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
27164 XFASTINT (before), 27162 XFASTINT (before),
27165 XFASTINT (after), 27163 XFASTINT (after),
27166 before_string, after_string, 27164 before_string, after_string,
27167 cover_string); 27165 disp_string);
27168 cursor = No_Cursor; 27166 cursor = No_Cursor;
27169 } 27167 }
27170 } 27168 }