summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-11-01 23:13:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-11-01 23:13:15 -0700
commit3616c8b26bfaf024d803371b85bee571cd6f061f (patch)
treebd7b5e6e3560b0496c144b13b44c1917cb9de8dc /src
parent5b0d046d5b6a6743be6888d02352b878151e1d6c (diff)
parentdb22a3c27b078148c26a9f50afca5454a68d37d1 (diff)
downloademacs-3616c8b26bfaf024d803371b85bee571cd6f061f.tar.gz
emacs-3616c8b26bfaf024d803371b85bee571cd6f061f.tar.bz2
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 @@
-2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
+2011-11-02 Paul Eggert <eggert@cs.ucla.edu>
Fix integer width and related bugs (Bug#9874).
* alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -786,6 +786,20 @@
rather than rolling our own approximation.
(SCROLL_BAR_VEC_SIZE): Remove; not used.
+2011-11-01 Eli Zaretskii <eliz@gnu.org>
+
+ * 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 <rudalics@gmx.at>
+
+ * 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 <eliz@gnu.org>
* 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)
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)));
@@ -6462,16 +6459,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;
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,
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
@@ -25824,7 +25824,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
ptrdiff_t 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);
@@ -25833,7 +25833,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
ptrdiff_t 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));
@@ -25843,7 +25843,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)
@@ -25855,7 +25855,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;
}
@@ -25880,10 +25880,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;
@@ -25898,7 +25898,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
@@ -25924,11 +25924,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));
@@ -25975,11 +25975,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));
@@ -26035,17 +26035,16 @@ 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
- 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));
@@ -26082,20 +26081,19 @@ 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;
}
/* 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));
@@ -27092,7 +27090,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))
{
@@ -27106,13 +27104,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))
@@ -27164,7 +27162,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;
}
}