diff options
| author | Kim F. Storm | 2004-03-26 00:33:18 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-03-26 00:33:18 +0000 |
| commit | be21b9259261d1da0983913d3fb2656fabadc920 (patch) | |
| tree | 7d4bdc579bbaafcdf830ce8d8555b23d2443ac2c /src | |
| parent | 6fc4c9c950436faf89474edd00e3ed8a6b5cb6b3 (diff) | |
| download | emacs-be21b9259261d1da0983913d3fb2656fabadc920.tar.gz emacs-be21b9259261d1da0983913d3fb2656fabadc920.zip | |
(syms_of_xdisp): Include `void-variable' in list_of_error
to catch errors in calc_pixel_width_or_height during redisplay.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index d39c72f2588..6711eb242ce 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -315,7 +315,7 @@ Lisp_Object Vshow_trailing_whitespace; | |||
| 315 | extern Lisp_Object Voverflow_newline_into_fringe; | 315 | extern Lisp_Object Voverflow_newline_into_fringe; |
| 316 | 316 | ||
| 317 | /* Test if overflow newline into fringe. Called with iterator IT | 317 | /* Test if overflow newline into fringe. Called with iterator IT |
| 318 | at or past right window margin, and with IT->current_x set. */ | 318 | at or past right window margin, and with IT->current_x set. */ |
| 319 | 319 | ||
| 320 | #define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) \ | 320 | #define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) \ |
| 321 | (!NILP (Voverflow_newline_into_fringe) \ | 321 | (!NILP (Voverflow_newline_into_fringe) \ |
| @@ -407,7 +407,7 @@ Lisp_Object Vglobal_mode_string; | |||
| 407 | 407 | ||
| 408 | /* List of variables (symbols) which hold markers for overlay arrows. | 408 | /* List of variables (symbols) which hold markers for overlay arrows. |
| 409 | The symbols on this list are examined during redisplay to determine | 409 | The symbols on this list are examined during redisplay to determine |
| 410 | where to display overlay arrows. */ | 410 | where to display overlay arrows. */ |
| 411 | 411 | ||
| 412 | Lisp_Object Voverlay_arrow_variable_list; | 412 | Lisp_Object Voverlay_arrow_variable_list; |
| 413 | 413 | ||
| @@ -8367,7 +8367,7 @@ update_tool_bar (f, save_match_data) | |||
| 8367 | /* Redisplay the tool-bar if we changed it. */ | 8367 | /* Redisplay the tool-bar if we changed it. */ |
| 8368 | if (! NILP (Fequal (old_tool_bar, f->tool_bar_items))) | 8368 | if (! NILP (Fequal (old_tool_bar, f->tool_bar_items))) |
| 8369 | w->update_mode_line = Qt; | 8369 | w->update_mode_line = Qt; |
| 8370 | 8370 | ||
| 8371 | UNGCPRO; | 8371 | UNGCPRO; |
| 8372 | 8372 | ||
| 8373 | unbind_to (count, Qnil); | 8373 | unbind_to (count, Qnil); |
| @@ -9466,7 +9466,7 @@ overlay_arrow_at_row (f, row, pbitmap) | |||
| 9466 | continue; | 9466 | continue; |
| 9467 | 9467 | ||
| 9468 | val = find_symbol_value (var); | 9468 | val = find_symbol_value (var); |
| 9469 | 9469 | ||
| 9470 | if (MARKERP (val) | 9470 | if (MARKERP (val) |
| 9471 | && current_buffer == XMARKER (val)->buffer | 9471 | && current_buffer == XMARKER (val)->buffer |
| 9472 | && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) | 9472 | && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) |
| @@ -9573,7 +9573,7 @@ select_frame_for_redisplay (frame) | |||
| 9573 | { | 9573 | { |
| 9574 | Lisp_Object tail, sym, val; | 9574 | Lisp_Object tail, sym, val; |
| 9575 | Lisp_Object old = selected_frame; | 9575 | Lisp_Object old = selected_frame; |
| 9576 | 9576 | ||
| 9577 | selected_frame = frame; | 9577 | selected_frame = frame; |
| 9578 | 9578 | ||
| 9579 | for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail)) | 9579 | for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail)) |
| @@ -11356,7 +11356,7 @@ set_vertical_scroll_bar (w) | |||
| 11356 | which reflect the whole buffer size, with special markers | 11356 | which reflect the whole buffer size, with special markers |
| 11357 | indicating narrowing, and scrollbars which reflect only the | 11357 | indicating narrowing, and scrollbars which reflect only the |
| 11358 | visible region. | 11358 | visible region. |
| 11359 | 11359 | ||
| 11360 | Note that mini-buffers sometimes aren't displaying any text. */ | 11360 | Note that mini-buffers sometimes aren't displaying any text. */ |
| 11361 | if (!MINI_WINDOW_P (w) | 11361 | if (!MINI_WINDOW_P (w) |
| 11362 | || (w == XWINDOW (minibuf_window) | 11362 | || (w == XWINDOW (minibuf_window) |
| @@ -11368,7 +11368,7 @@ set_vertical_scroll_bar (w) | |||
| 11368 | /* I don't think this is guaranteed to be right. For the | 11368 | /* I don't think this is guaranteed to be right. For the |
| 11369 | moment, we'll pretend it is. */ | 11369 | moment, we'll pretend it is. */ |
| 11370 | end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf); | 11370 | end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf); |
| 11371 | 11371 | ||
| 11372 | if (end < start) | 11372 | if (end < start) |
| 11373 | end = start; | 11373 | end = start; |
| 11374 | if (whole < (end - start)) | 11374 | if (whole < (end - start)) |
| @@ -16702,7 +16702,7 @@ invisible_p (propval, list) | |||
| 16702 | /* Calculate a width or height in pixels from a specification using | 16702 | /* Calculate a width or height in pixels from a specification using |
| 16703 | the following elements: | 16703 | the following elements: |
| 16704 | 16704 | ||
| 16705 | SPEC ::= | 16705 | SPEC ::= |
| 16706 | NUM - a (fractional) multiple of the default font width/height | 16706 | NUM - a (fractional) multiple of the default font width/height |
| 16707 | (NUM) - specifies exactly NUM pixels | 16707 | (NUM) - specifies exactly NUM pixels |
| 16708 | UNIT - a fixed number of pixels, see below. | 16708 | UNIT - a fixed number of pixels, see below. |
| @@ -16712,7 +16712,7 @@ invisible_p (propval, list) | |||
| 16712 | (- SPEC SPEC ...) - subtract pixel values | 16712 | (- SPEC SPEC ...) - subtract pixel values |
| 16713 | (- SPEC) - negate pixel value | 16713 | (- SPEC) - negate pixel value |
| 16714 | 16714 | ||
| 16715 | NUM ::= | 16715 | NUM ::= |
| 16716 | INT or FLOAT - a number constant | 16716 | INT or FLOAT - a number constant |
| 16717 | SYMBOL - use symbol's (buffer local) variable binding. | 16717 | SYMBOL - use symbol's (buffer local) variable binding. |
| 16718 | 16718 | ||
| @@ -16738,15 +16738,15 @@ invisible_p (propval, list) | |||
| 16738 | Examples: | 16738 | Examples: |
| 16739 | 16739 | ||
| 16740 | Pixels corresponding to 5 inches: | 16740 | Pixels corresponding to 5 inches: |
| 16741 | (5 . in) | 16741 | (5 . in) |
| 16742 | 16742 | ||
| 16743 | Total width of non-text areas on left side of window (if scroll-bar is on left): | 16743 | Total width of non-text areas on left side of window (if scroll-bar is on left): |
| 16744 | '(space :width (+ left-fringe left-margin scroll-bar)) | 16744 | '(space :width (+ left-fringe left-margin scroll-bar)) |
| 16745 | 16745 | ||
| 16746 | Align to first text column (in header line): | 16746 | Align to first text column (in header line): |
| 16747 | '(space :align-to 0) | 16747 | '(space :align-to 0) |
| 16748 | 16748 | ||
| 16749 | Align to middle of text area minus half the width of variable `my-image' | 16749 | Align to middle of text area minus half the width of variable `my-image' |
| 16750 | containing a loaded image: | 16750 | containing a loaded image: |
| 16751 | '(space :align-to (0.5 . (- text my-image))) | 16751 | '(space :align-to (0.5 . (- text my-image))) |
| 16752 | 16752 | ||
| @@ -18314,7 +18314,7 @@ produce_stretch_glyph (it) | |||
| 18314 | && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to)) | 18314 | && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to)) |
| 18315 | { | 18315 | { |
| 18316 | if (it->glyph_row == NULL || !it->glyph_row->mode_line_p) | 18316 | if (it->glyph_row == NULL || !it->glyph_row->mode_line_p) |
| 18317 | align_to = (align_to < 0 | 18317 | align_to = (align_to < 0 |
| 18318 | ? 0 | 18318 | ? 0 |
| 18319 | : align_to - window_box_left_offset (it->w, TEXT_AREA)); | 18319 | : align_to - window_box_left_offset (it->w, TEXT_AREA)); |
| 18320 | else if (align_to < 0) | 18320 | else if (align_to < 0) |
| @@ -20197,7 +20197,7 @@ on_hot_spot_p (hot_spot, x, y) | |||
| 20197 | int x0, y0; | 20197 | int x0, y0; |
| 20198 | 20198 | ||
| 20199 | /* Need an even number of coordinates, and at least 3 edges. */ | 20199 | /* Need an even number of coordinates, and at least 3 edges. */ |
| 20200 | if (n < 6 || n & 1) | 20200 | if (n < 6 || n & 1) |
| 20201 | return 0; | 20201 | return 0; |
| 20202 | 20202 | ||
| 20203 | /* Count edge segments intersecting line from (X,Y) to (X,infinity). | 20203 | /* Count edge segments intersecting line from (X,Y) to (X,infinity). |
| @@ -20248,13 +20248,13 @@ find_hot_spot (map, x, y) | |||
| 20248 | return XCAR (map); | 20248 | return XCAR (map); |
| 20249 | map = XCDR (map); | 20249 | map = XCDR (map); |
| 20250 | } | 20250 | } |
| 20251 | 20251 | ||
| 20252 | return Qnil; | 20252 | return Qnil; |
| 20253 | } | 20253 | } |
| 20254 | 20254 | ||
| 20255 | DEFUN ("lookup-image-map", Flookup_image_map, Slookup_image_map, | 20255 | DEFUN ("lookup-image-map", Flookup_image_map, Slookup_image_map, |
| 20256 | 3, 3, 0, | 20256 | 3, 3, 0, |
| 20257 | doc: /* Lookup in image map MAP coordinates X and Y. | 20257 | doc: /* Lookup in image map MAP coordinates X and Y. |
| 20258 | An image map is an alist where each element has the format (AREA ID PLIST). | 20258 | An image map is an alist where each element has the format (AREA ID PLIST). |
| 20259 | An AREA is specified as either a rectangle, a circle, or a polygon: | 20259 | An AREA is specified as either a rectangle, a circle, or a polygon: |
| 20260 | A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the | 20260 | A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the |
| @@ -21128,13 +21128,13 @@ phys_cursor_in_rect_p (w, r) | |||
| 21128 | cursor_glyph = get_phys_cursor_glyph (w); | 21128 | cursor_glyph = get_phys_cursor_glyph (w); |
| 21129 | if (cursor_glyph) | 21129 | if (cursor_glyph) |
| 21130 | { | 21130 | { |
| 21131 | /* r is relative to W's box, but w->phys_cursor.x is relative | 21131 | /* r is relative to W's box, but w->phys_cursor.x is relative |
| 21132 | to left edge of W's TEXT area. Adjust it. */ | 21132 | to left edge of W's TEXT area. Adjust it. */ |
| 21133 | cr.x = window_box_left_offset (w, TEXT_AREA) + w->phys_cursor.x; | 21133 | cr.x = window_box_left_offset (w, TEXT_AREA) + w->phys_cursor.x; |
| 21134 | cr.y = w->phys_cursor.y; | 21134 | cr.y = w->phys_cursor.y; |
| 21135 | cr.width = cursor_glyph->pixel_width; | 21135 | cr.width = cursor_glyph->pixel_width; |
| 21136 | cr.height = w->phys_cursor_height; | 21136 | cr.height = w->phys_cursor_height; |
| 21137 | /* ++KFS: W32 version used W32-specific IntersectRect here, but | 21137 | /* ++KFS: W32 version used W32-specific IntersectRect here, but |
| 21138 | I assume the effect is the same -- and this is portable. */ | 21138 | I assume the effect is the same -- and this is portable. */ |
| 21139 | return x_intersect_rectangles (&cr, r, &result); | 21139 | return x_intersect_rectangles (&cr, r, &result); |
| 21140 | } | 21140 | } |
| @@ -21152,7 +21152,7 @@ x_draw_vertical_border (w) | |||
| 21152 | struct window *w; | 21152 | struct window *w; |
| 21153 | { | 21153 | { |
| 21154 | /* We could do better, if we knew what type of scroll-bar the adjacent | 21154 | /* We could do better, if we knew what type of scroll-bar the adjacent |
| 21155 | windows (on either side) have... But we don't :-( | 21155 | windows (on either side) have... But we don't :-( |
| 21156 | However, I think this works ok. ++KFS 2003-04-25 */ | 21156 | However, I think this works ok. ++KFS 2003-04-25 */ |
| 21157 | 21157 | ||
| 21158 | /* Redraw borders between horizontally adjacent windows. Don't | 21158 | /* Redraw borders between horizontally adjacent windows. Don't |
| @@ -21643,7 +21643,9 @@ syms_of_xdisp () | |||
| 21643 | Qinhibit_free_realized_faces = intern ("inhibit-free-realized-faces"); | 21643 | Qinhibit_free_realized_faces = intern ("inhibit-free-realized-faces"); |
| 21644 | staticpro (&Qinhibit_free_realized_faces); | 21644 | staticpro (&Qinhibit_free_realized_faces); |
| 21645 | 21645 | ||
| 21646 | list_of_error = Fcons (intern ("error"), Qnil); | 21646 | list_of_error = Fcons (Fcons (intern ("error"), |
| 21647 | Fcons (intern ("void-variable"), Qnil)), | ||
| 21648 | Qnil); | ||
| 21647 | staticpro (&list_of_error); | 21649 | staticpro (&list_of_error); |
| 21648 | 21650 | ||
| 21649 | Qlast_arrow_position = intern ("last-arrow-position"); | 21651 | Qlast_arrow_position = intern ("last-arrow-position"); |
| @@ -21699,7 +21701,7 @@ The face used for trailing whitespace is `trailing-whitespace'. */); | |||
| 21699 | DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, | 21701 | DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, |
| 21700 | doc: /* *The pointer shape to show in void text areas. | 21702 | doc: /* *The pointer shape to show in void text areas. |
| 21701 | Nil means to show the text pointer. Other options are `arrow', `text', | 21703 | Nil means to show the text pointer. Other options are `arrow', `text', |
| 21702 | `hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); | 21704 | `hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); |
| 21703 | Vvoid_text_area_pointer = Qarrow; | 21705 | Vvoid_text_area_pointer = Qarrow; |
| 21704 | 21706 | ||
| 21705 | DEFVAR_LISP ("inhibit-redisplay", &Vinhibit_redisplay, | 21707 | DEFVAR_LISP ("inhibit-redisplay", &Vinhibit_redisplay, |