diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 14 | ||||
| -rw-r--r-- | src/window.c | 15 | ||||
| -rw-r--r-- | src/xdisp.c | 50 |
3 files changed, 39 insertions, 40 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0bb16514b58..f1ba519d92a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2011-11-01 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. | ||
| 4 | Don't stop backward scan on the continuation glyph, even though | ||
| 5 | its CHARPOS is positive. | ||
| 6 | (mouse_face_from_buffer_pos, note_mouse_highlight): Rename | ||
| 7 | cover_string to disp_string. | ||
| 8 | |||
| 9 | 2011-11-01 Martin Rudalics <rudalics@gmx.at> | ||
| 10 | |||
| 11 | * window.c (temp_output_buffer_show): Don't use | ||
| 12 | Vtemp_buffer_show_specifiers. | ||
| 13 | (Vtemp_buffer_show_specifiers): Remove unused variable. | ||
| 14 | |||
| 1 | 2011-10-30 Eli Zaretskii <eliz@gnu.org> | 15 | 2011-10-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 16 | ||
| 3 | * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented | 17 | * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented |
diff --git a/src/window.c b/src/window.c index e6840a0ebe7..056da1512da 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3187,10 +3187,7 @@ temp_output_buffer_show (register Lisp_Object buf) | |||
| 3187 | call1 (Vtemp_buffer_show_function, buf); | 3187 | call1 (Vtemp_buffer_show_function, buf); |
| 3188 | else | 3188 | else |
| 3189 | { | 3189 | { |
| 3190 | window = display_buffer (buf, Vtemp_buffer_show_specifiers, Qnil); | 3190 | window = display_buffer (buf, Qnil, Qnil); |
| 3191 | /* Reset Vtemp_buffer_show_specifiers immediately so it won't | ||
| 3192 | affect subsequent calls. */ | ||
| 3193 | Vtemp_buffer_show_specifiers = Qnil; | ||
| 3194 | 3191 | ||
| 3195 | if (!EQ (XWINDOW (window)->frame, selected_frame)) | 3192 | if (!EQ (XWINDOW (window)->frame, selected_frame)) |
| 3196 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); | 3193 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); |
| @@ -6465,16 +6462,6 @@ If this function is used, then it must do the entire job of showing | |||
| 6465 | the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */); | 6462 | the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */); |
| 6466 | Vtemp_buffer_show_function = Qnil; | 6463 | Vtemp_buffer_show_function = Qnil; |
| 6467 | 6464 | ||
| 6468 | DEFVAR_LISP ("temp-buffer-show-specifiers", Vtemp_buffer_show_specifiers, | ||
| 6469 | doc: /* Buffer display specifiers used by `with-output-to-temp-buffer'. | ||
| 6470 | These specifiers are passed by `with-output-to-temp-buffer' as second | ||
| 6471 | argument to `display-buffer'. Applications should only let-bind this | ||
| 6472 | around a call to `with-output-to-temp-buffer'. | ||
| 6473 | |||
| 6474 | For a description of buffer display specifiers see the variable | ||
| 6475 | `display-buffer-alist'. */); | ||
| 6476 | Vtemp_buffer_show_specifiers = Qnil; | ||
| 6477 | |||
| 6478 | DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window, | 6465 | DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window, |
| 6479 | doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); | 6466 | doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); |
| 6480 | Vminibuf_scroll_window = Qnil; | 6467 | Vminibuf_scroll_window = Qnil; |
diff --git a/src/xdisp.c b/src/xdisp.c index 4362d2dc7a9..b7fc1141e28 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -26046,7 +26046,7 @@ rows_from_pos_range (struct window *w, | |||
| 26046 | for the overlay or run of text properties specifying the mouse | 26046 | for the overlay or run of text properties specifying the mouse |
| 26047 | face. BEFORE_STRING and AFTER_STRING, if non-nil, are a | 26047 | face. BEFORE_STRING and AFTER_STRING, if non-nil, are a |
| 26048 | before-string and after-string that must also be highlighted. | 26048 | before-string and after-string that must also be highlighted. |
| 26049 | COVER_STRING, if non-nil, is a display string that may cover some | 26049 | DISP_STRING, if non-nil, is a display string that may cover some |
| 26050 | or all of the highlighted text. */ | 26050 | or all of the highlighted text. */ |
| 26051 | 26051 | ||
| 26052 | static void | 26052 | static void |
| @@ -26057,7 +26057,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26057 | EMACS_INT end_charpos, | 26057 | EMACS_INT end_charpos, |
| 26058 | Lisp_Object before_string, | 26058 | Lisp_Object before_string, |
| 26059 | Lisp_Object after_string, | 26059 | Lisp_Object after_string, |
| 26060 | Lisp_Object cover_string) | 26060 | Lisp_Object disp_string) |
| 26061 | { | 26061 | { |
| 26062 | struct window *w = XWINDOW (window); | 26062 | struct window *w = XWINDOW (window); |
| 26063 | struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 26063 | struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| @@ -26066,7 +26066,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26066 | EMACS_INT ignore, pos; | 26066 | EMACS_INT ignore, pos; |
| 26067 | int x; | 26067 | int x; |
| 26068 | 26068 | ||
| 26069 | xassert (NILP (cover_string) || STRINGP (cover_string)); | 26069 | xassert (NILP (disp_string) || STRINGP (disp_string)); |
| 26070 | xassert (NILP (before_string) || STRINGP (before_string)); | 26070 | xassert (NILP (before_string) || STRINGP (before_string)); |
| 26071 | xassert (NILP (after_string) || STRINGP (after_string)); | 26071 | xassert (NILP (after_string) || STRINGP (after_string)); |
| 26072 | 26072 | ||
| @@ -26076,7 +26076,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26076 | r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); | 26076 | r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); |
| 26077 | /* If the before-string or display-string contains newlines, | 26077 | /* If the before-string or display-string contains newlines, |
| 26078 | rows_from_pos_range skips to its last row. Move back. */ | 26078 | rows_from_pos_range skips to its last row. Move back. */ |
| 26079 | if (!NILP (before_string) || !NILP (cover_string)) | 26079 | if (!NILP (before_string) || !NILP (disp_string)) |
| 26080 | { | 26080 | { |
| 26081 | struct glyph_row *prev; | 26081 | struct glyph_row *prev; |
| 26082 | while ((prev = r1 - 1, prev >= first) | 26082 | while ((prev = r1 - 1, prev >= first) |
| @@ -26088,7 +26088,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26088 | while (--glyph >= beg && INTEGERP (glyph->object)); | 26088 | while (--glyph >= beg && INTEGERP (glyph->object)); |
| 26089 | if (glyph < beg | 26089 | if (glyph < beg |
| 26090 | || !(EQ (glyph->object, before_string) | 26090 | || !(EQ (glyph->object, before_string) |
| 26091 | || EQ (glyph->object, cover_string))) | 26091 | || EQ (glyph->object, disp_string))) |
| 26092 | break; | 26092 | break; |
| 26093 | r1 = prev; | 26093 | r1 = prev; |
| 26094 | } | 26094 | } |
| @@ -26113,10 +26113,10 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26113 | r2 = next; | 26113 | r2 = next; |
| 26114 | } | 26114 | } |
| 26115 | /* The rest of the display engine assumes that mouse_face_beg_row is | 26115 | /* The rest of the display engine assumes that mouse_face_beg_row is |
| 26116 | either above below mouse_face_end_row or identical to it. But | 26116 | either above mouse_face_end_row or identical to it. But with |
| 26117 | with bidi-reordered continued lines, the row for START_CHARPOS | 26117 | bidi-reordered continued lines, the row for START_CHARPOS could |
| 26118 | could be below the row for END_CHARPOS. If so, swap the rows and | 26118 | be below the row for END_CHARPOS. If so, swap the rows and store |
| 26119 | store them in correct order. */ | 26119 | them in correct order. */ |
| 26120 | if (r1->y > r2->y) | 26120 | if (r1->y > r2->y) |
| 26121 | { | 26121 | { |
| 26122 | struct glyph_row *tem = r2; | 26122 | struct glyph_row *tem = r2; |
| @@ -26131,7 +26131,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26131 | hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); | 26131 | hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); |
| 26132 | 26132 | ||
| 26133 | /* For a bidi-reordered row, the positions of BEFORE_STRING, | 26133 | /* For a bidi-reordered row, the positions of BEFORE_STRING, |
| 26134 | AFTER_STRING, COVER_STRING, START_CHARPOS, and END_CHARPOS | 26134 | AFTER_STRING, DISP_STRING, START_CHARPOS, and END_CHARPOS |
| 26135 | could be anywhere in the row and in any order. The strategy | 26135 | could be anywhere in the row and in any order. The strategy |
| 26136 | below is to find the leftmost and the rightmost glyph that | 26136 | below is to find the leftmost and the rightmost glyph that |
| 26137 | belongs to either of these 3 strings, or whose position is | 26137 | belongs to either of these 3 strings, or whose position is |
| @@ -26157,11 +26157,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26157 | x += glyph->pixel_width; | 26157 | x += glyph->pixel_width; |
| 26158 | 26158 | ||
| 26159 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, | 26159 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, |
| 26160 | or COVER_STRING, and the first glyph from buffer whose | 26160 | or DISP_STRING, and the first glyph from buffer whose |
| 26161 | position is between START_CHARPOS and END_CHARPOS. */ | 26161 | position is between START_CHARPOS and END_CHARPOS. */ |
| 26162 | for (; glyph < end | 26162 | for (; glyph < end |
| 26163 | && !INTEGERP (glyph->object) | 26163 | && !INTEGERP (glyph->object) |
| 26164 | && !EQ (glyph->object, cover_string) | 26164 | && !EQ (glyph->object, disp_string) |
| 26165 | && !(BUFFERP (glyph->object) | 26165 | && !(BUFFERP (glyph->object) |
| 26166 | && (glyph->charpos >= start_charpos | 26166 | && (glyph->charpos >= start_charpos |
| 26167 | && glyph->charpos < end_charpos)); | 26167 | && glyph->charpos < end_charpos)); |
| @@ -26208,11 +26208,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26208 | ; | 26208 | ; |
| 26209 | 26209 | ||
| 26210 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, | 26210 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, |
| 26211 | or COVER_STRING, and the first glyph from buffer whose | 26211 | or DISP_STRING, and the first glyph from buffer whose |
| 26212 | position is between START_CHARPOS and END_CHARPOS. */ | 26212 | position is between START_CHARPOS and END_CHARPOS. */ |
| 26213 | for (; glyph > end | 26213 | for (; glyph > end |
| 26214 | && !INTEGERP (glyph->object) | 26214 | && !INTEGERP (glyph->object) |
| 26215 | && !EQ (glyph->object, cover_string) | 26215 | && !EQ (glyph->object, disp_string) |
| 26216 | && !(BUFFERP (glyph->object) | 26216 | && !(BUFFERP (glyph->object) |
| 26217 | && (glyph->charpos >= start_charpos | 26217 | && (glyph->charpos >= start_charpos |
| 26218 | && glyph->charpos < end_charpos)); | 26218 | && glyph->charpos < end_charpos)); |
| @@ -26268,17 +26268,16 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26268 | row, and also blanks and stretch glyphs inserted by | 26268 | row, and also blanks and stretch glyphs inserted by |
| 26269 | extend_face_to_end_of_line. */ | 26269 | extend_face_to_end_of_line. */ |
| 26270 | while (end > glyph | 26270 | while (end > glyph |
| 26271 | && INTEGERP ((end - 1)->object) | 26271 | && INTEGERP ((end - 1)->object)) |
| 26272 | && (end - 1)->charpos <= 0) | ||
| 26273 | --end; | 26272 | --end; |
| 26274 | /* Scan the rest of the glyph row from the end, looking for the | 26273 | /* Scan the rest of the glyph row from the end, looking for the |
| 26275 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or | 26274 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or |
| 26276 | COVER_STRING, or whose position is between START_CHARPOS | 26275 | DISP_STRING, or whose position is between START_CHARPOS |
| 26277 | and END_CHARPOS */ | 26276 | and END_CHARPOS */ |
| 26278 | for (--end; | 26277 | for (--end; |
| 26279 | end > glyph | 26278 | end > glyph |
| 26280 | && !INTEGERP (end->object) | 26279 | && !INTEGERP (end->object) |
| 26281 | && !EQ (end->object, cover_string) | 26280 | && !EQ (end->object, disp_string) |
| 26282 | && !(BUFFERP (end->object) | 26281 | && !(BUFFERP (end->object) |
| 26283 | && (end->charpos >= start_charpos | 26282 | && (end->charpos >= start_charpos |
| 26284 | && end->charpos < end_charpos)); | 26283 | && end->charpos < end_charpos)); |
| @@ -26315,20 +26314,19 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26315 | x = r2->x; | 26314 | x = r2->x; |
| 26316 | end++; | 26315 | end++; |
| 26317 | while (end < glyph | 26316 | while (end < glyph |
| 26318 | && INTEGERP (end->object) | 26317 | && INTEGERP (end->object)) |
| 26319 | && end->charpos <= 0) | ||
| 26320 | { | 26318 | { |
| 26321 | x += end->pixel_width; | 26319 | x += end->pixel_width; |
| 26322 | ++end; | 26320 | ++end; |
| 26323 | } | 26321 | } |
| 26324 | /* Scan the rest of the glyph row from the end, looking for the | 26322 | /* Scan the rest of the glyph row from the end, looking for the |
| 26325 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or | 26323 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or |
| 26326 | COVER_STRING, or whose position is between START_CHARPOS | 26324 | DISP_STRING, or whose position is between START_CHARPOS |
| 26327 | and END_CHARPOS */ | 26325 | and END_CHARPOS */ |
| 26328 | for ( ; | 26326 | for ( ; |
| 26329 | end < glyph | 26327 | end < glyph |
| 26330 | && !INTEGERP (end->object) | 26328 | && !INTEGERP (end->object) |
| 26331 | && !EQ (end->object, cover_string) | 26329 | && !EQ (end->object, disp_string) |
| 26332 | && !(BUFFERP (end->object) | 26330 | && !(BUFFERP (end->object) |
| 26333 | && (end->charpos >= start_charpos | 26331 | && (end->charpos >= start_charpos |
| 26334 | && end->charpos < end_charpos)); | 26332 | && end->charpos < end_charpos)); |
| @@ -27323,7 +27321,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 27323 | /* The mouse-highlighting, if any, comes from an overlay | 27321 | /* The mouse-highlighting, if any, comes from an overlay |
| 27324 | or text property in the buffer. */ | 27322 | or text property in the buffer. */ |
| 27325 | Lisp_Object buffer IF_LINT (= Qnil); | 27323 | Lisp_Object buffer IF_LINT (= Qnil); |
| 27326 | Lisp_Object cover_string IF_LINT (= Qnil); | 27324 | Lisp_Object disp_string IF_LINT (= Qnil); |
| 27327 | 27325 | ||
| 27328 | if (STRINGP (object)) | 27326 | if (STRINGP (object)) |
| 27329 | { | 27327 | { |
| @@ -27337,13 +27335,13 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 27337 | mouse_face = get_char_property_and_overlay | 27335 | mouse_face = get_char_property_and_overlay |
| 27338 | (make_number (pos), Qmouse_face, w->buffer, &overlay); | 27336 | (make_number (pos), Qmouse_face, w->buffer, &overlay); |
| 27339 | buffer = w->buffer; | 27337 | buffer = w->buffer; |
| 27340 | cover_string = object; | 27338 | disp_string = object; |
| 27341 | } | 27339 | } |
| 27342 | } | 27340 | } |
| 27343 | else | 27341 | else |
| 27344 | { | 27342 | { |
| 27345 | buffer = object; | 27343 | buffer = object; |
| 27346 | cover_string = Qnil; | 27344 | disp_string = Qnil; |
| 27347 | } | 27345 | } |
| 27348 | 27346 | ||
| 27349 | if (!NILP (mouse_face)) | 27347 | if (!NILP (mouse_face)) |
| @@ -27395,7 +27393,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 27395 | XFASTINT (before), | 27393 | XFASTINT (before), |
| 27396 | XFASTINT (after), | 27394 | XFASTINT (after), |
| 27397 | before_string, after_string, | 27395 | before_string, after_string, |
| 27398 | cover_string); | 27396 | disp_string); |
| 27399 | cursor = No_Cursor; | 27397 | cursor = No_Cursor; |
| 27400 | } | 27398 | } |
| 27401 | } | 27399 | } |