From 4ee88440781304fc7003d51e363c3e3a5cc2e8fd Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 1 Nov 2011 17:21:41 +0100 Subject: Remove unused variable temp-buffer-show-specifiers. * window.c (temp_output_buffer_show): Don't use Vtemp_buffer_show_specifiers. (Vtemp_buffer_show_specifiers): Remove unused variable. * help.el (with-help-window): Don't reference temp-buffer-show-specifiers in doc-string. --- src/ChangeLog | 6 ++++++ src/window.c | 15 +-------------- 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 0bb16514b58..37635555a0f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-11-01 Martin Rudalics + + * window.c (temp_output_buffer_show): Don't use + Vtemp_buffer_show_specifiers. + (Vtemp_buffer_show_specifiers): Remove unused variable. + 2011-10-30 Eli Zaretskii * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented diff --git a/src/window.c b/src/window.c index 38f16c91f34..422073b1bd3 100644 --- a/src/window.c +++ b/src/window.c @@ -3185,10 +3185,7 @@ temp_output_buffer_show (register Lisp_Object buf) call1 (Vtemp_buffer_show_function, buf); else { - window = display_buffer (buf, Vtemp_buffer_show_specifiers, Qnil); - /* Reset Vtemp_buffer_show_specifiers immediately so it won't - affect subsequent calls. */ - Vtemp_buffer_show_specifiers = Qnil; + window = display_buffer (buf, Qnil, Qnil); if (!EQ (XWINDOW (window)->frame, selected_frame)) Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); @@ -6460,16 +6457,6 @@ If this function is used, then it must do the entire job of showing the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */); Vtemp_buffer_show_function = Qnil; - DEFVAR_LISP ("temp-buffer-show-specifiers", Vtemp_buffer_show_specifiers, - doc: /* Buffer display specifiers used by `with-output-to-temp-buffer'. -These specifiers are passed by `with-output-to-temp-buffer' as second -argument to `display-buffer'. Applications should only let-bind this -around a call to `with-output-to-temp-buffer'. - -For a description of buffer display specifiers see the variable -`display-buffer-alist'. */); - Vtemp_buffer_show_specifiers = Qnil; - DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window, doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); Vminibuf_scroll_window = Qnil; -- cgit v1.2.3 From bc17a887d1df07f5a75287ff7d551d548e10f387 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 1 Nov 2011 20:57:03 +0200 Subject: Fix mouse highlight in continued lines on a TTY. src/xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. Don't stop backward scan on the continuation glyph, even though its CHARPOS is positive. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 37635555a0f..d27a8625407 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-11-01 Eli Zaretskii + + * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. + Don't stop backward scan on the continuation glyph, even though + its CHARPOS is positive. + 2011-11-01 Martin Rudalics * window.c (temp_output_buffer_show): Don't use diff --git a/src/xdisp.c b/src/xdisp.c index 33c5fc0d230..99d0d69d834 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -25875,10 +25875,10 @@ mouse_face_from_buffer_pos (Lisp_Object window, r2 = next; } /* The rest of the display engine assumes that mouse_face_beg_row is - either above below mouse_face_end_row or identical to it. But - with bidi-reordered continued lines, the row for START_CHARPOS - could be below the row for END_CHARPOS. If so, swap the rows and - store them in correct order. */ + either above mouse_face_end_row or identical to it. But with + bidi-reordered continued lines, the row for START_CHARPOS could + be below the row for END_CHARPOS. If so, swap the rows and store + them in correct order. */ if (r1->y > r2->y) { struct glyph_row *tem = r2; @@ -26030,8 +26030,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, row, and also blanks and stretch glyphs inserted by extend_face_to_end_of_line. */ while (end > glyph - && INTEGERP ((end - 1)->object) - && (end - 1)->charpos <= 0) + && INTEGERP ((end - 1)->object)) --end; /* Scan the rest of the glyph row from the end, looking for the first glyph that comes from BEFORE_STRING, AFTER_STRING, or @@ -26077,8 +26076,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, x = r2->x; end++; while (end < glyph - && INTEGERP (end->object) - && end->charpos <= 0) + && INTEGERP (end->object)) { x += end->pixel_width; ++end; -- cgit v1.2.3 From 26b46e515c1695a73930255dd79cca6d0eb84321 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 1 Nov 2011 21:19:07 +0200 Subject: Rename locals to match their nature. src/xdisp.c (mouse_face_from_buffer_pos, note_mouse_highlight): Rename cover_string to disp_string. --- src/ChangeLog | 2 ++ src/xdisp.c | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index d27a8625407..f1ba519d92a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. Don't stop backward scan on the continuation glyph, even though its CHARPOS is positive. + (mouse_face_from_buffer_pos, note_mouse_highlight): Rename + cover_string to disp_string. 2011-11-01 Martin Rudalics diff --git a/src/xdisp.c b/src/xdisp.c index 99d0d69d834..97687f8975b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -25808,7 +25808,7 @@ rows_from_pos_range (struct window *w, for the overlay or run of text properties specifying the mouse face. BEFORE_STRING and AFTER_STRING, if non-nil, are a before-string and after-string that must also be highlighted. - COVER_STRING, if non-nil, is a display string that may cover some + DISP_STRING, if non-nil, is a display string that may cover some or all of the highlighted text. */ static void @@ -25819,7 +25819,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, EMACS_INT end_charpos, Lisp_Object before_string, Lisp_Object after_string, - Lisp_Object cover_string) + Lisp_Object disp_string) { struct window *w = XWINDOW (window); struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); @@ -25828,7 +25828,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, EMACS_INT ignore, pos; int x; - xassert (NILP (cover_string) || STRINGP (cover_string)); + xassert (NILP (disp_string) || STRINGP (disp_string)); xassert (NILP (before_string) || STRINGP (before_string)); xassert (NILP (after_string) || STRINGP (after_string)); @@ -25838,7 +25838,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); /* If the before-string or display-string contains newlines, rows_from_pos_range skips to its last row. Move back. */ - if (!NILP (before_string) || !NILP (cover_string)) + if (!NILP (before_string) || !NILP (disp_string)) { struct glyph_row *prev; while ((prev = r1 - 1, prev >= first) @@ -25850,7 +25850,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, while (--glyph >= beg && INTEGERP (glyph->object)); if (glyph < beg || !(EQ (glyph->object, before_string) - || EQ (glyph->object, cover_string))) + || EQ (glyph->object, disp_string))) break; r1 = prev; } @@ -25893,7 +25893,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); /* For a bidi-reordered row, the positions of BEFORE_STRING, - AFTER_STRING, COVER_STRING, START_CHARPOS, and END_CHARPOS + AFTER_STRING, DISP_STRING, START_CHARPOS, and END_CHARPOS could be anywhere in the row and in any order. The strategy below is to find the leftmost and the rightmost glyph that belongs to either of these 3 strings, or whose position is @@ -25919,11 +25919,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, x += glyph->pixel_width; /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, - or COVER_STRING, and the first glyph from buffer whose + or DISP_STRING, and the first glyph from buffer whose position is between START_CHARPOS and END_CHARPOS. */ for (; glyph < end && !INTEGERP (glyph->object) - && !EQ (glyph->object, cover_string) + && !EQ (glyph->object, disp_string) && !(BUFFERP (glyph->object) && (glyph->charpos >= start_charpos && glyph->charpos < end_charpos)); @@ -25970,11 +25970,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, ; /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, - or COVER_STRING, and the first glyph from buffer whose + or DISP_STRING, and the first glyph from buffer whose position is between START_CHARPOS and END_CHARPOS. */ for (; glyph > end && !INTEGERP (glyph->object) - && !EQ (glyph->object, cover_string) + && !EQ (glyph->object, disp_string) && !(BUFFERP (glyph->object) && (glyph->charpos >= start_charpos && glyph->charpos < end_charpos)); @@ -26034,12 +26034,12 @@ mouse_face_from_buffer_pos (Lisp_Object window, --end; /* Scan the rest of the glyph row from the end, looking for the first glyph that comes from BEFORE_STRING, AFTER_STRING, or - COVER_STRING, or whose position is between START_CHARPOS + DISP_STRING, or whose position is between START_CHARPOS and END_CHARPOS */ for (--end; end > glyph && !INTEGERP (end->object) - && !EQ (end->object, cover_string) + && !EQ (end->object, disp_string) && !(BUFFERP (end->object) && (end->charpos >= start_charpos && end->charpos < end_charpos)); @@ -26083,12 +26083,12 @@ mouse_face_from_buffer_pos (Lisp_Object window, } /* Scan the rest of the glyph row from the end, looking for the first glyph that comes from BEFORE_STRING, AFTER_STRING, or - COVER_STRING, or whose position is between START_CHARPOS + DISP_STRING, or whose position is between START_CHARPOS and END_CHARPOS */ for ( ; end < glyph && !INTEGERP (end->object) - && !EQ (end->object, cover_string) + && !EQ (end->object, disp_string) && !(BUFFERP (end->object) && (end->charpos >= start_charpos && end->charpos < end_charpos)); @@ -27083,7 +27083,7 @@ note_mouse_highlight (struct frame *f, int x, int y) /* The mouse-highlighting, if any, comes from an overlay or text property in the buffer. */ Lisp_Object buffer IF_LINT (= Qnil); - Lisp_Object cover_string IF_LINT (= Qnil); + Lisp_Object disp_string IF_LINT (= Qnil); if (STRINGP (object)) { @@ -27097,13 +27097,13 @@ note_mouse_highlight (struct frame *f, int x, int y) mouse_face = get_char_property_and_overlay (make_number (pos), Qmouse_face, w->buffer, &overlay); buffer = w->buffer; - cover_string = object; + disp_string = object; } } else { buffer = object; - cover_string = Qnil; + disp_string = Qnil; } if (!NILP (mouse_face)) @@ -27155,7 +27155,7 @@ note_mouse_highlight (struct frame *f, int x, int y) XFASTINT (before), XFASTINT (after), before_string, after_string, - cover_string); + disp_string); cursor = No_Cursor; } } -- cgit v1.2.3