diff options
| author | Miles Bader | 2004-07-28 07:05:52 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-07-28 07:05:52 +0000 |
| commit | 54685a78a73fcf2f53fd0e8a7a3c7478b8650f1b (patch) | |
| tree | 998cde32667cb156ef66ceda314d53b168370588 /src | |
| parent | 6bb4a8bf9aaa63141ad7c12ab6b6ba9939050178 (diff) | |
| parent | b687047c72d2d13ced9ce55d38193b24ec722773 (diff) | |
| download | emacs-54685a78a73fcf2f53fd0e8a7a3c7478b8650f1b.tar.gz emacs-54685a78a73fcf2f53fd0e8a7a3c7478b8650f1b.zip | |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-26
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-466
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-470
Update from CVS
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 46 | ||||
| -rw-r--r-- | src/abbrev.c | 4 | ||||
| -rw-r--r-- | src/alloc.c | 11 | ||||
| -rw-r--r-- | src/dispextern.h | 3 | ||||
| -rw-r--r-- | src/fileio.c | 2 | ||||
| -rw-r--r-- | src/frame.c | 18 | ||||
| -rw-r--r-- | src/keyboard.h | 1 | ||||
| -rw-r--r-- | src/window.c | 18 | ||||
| -rw-r--r-- | src/xdisp.c | 32 | ||||
| -rw-r--r-- | src/xfaces.c | 1 | ||||
| -rw-r--r-- | src/xfns.c | 24 |
11 files changed, 143 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e51cdf554ce..d06be958790 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,49 @@ | |||
| 1 | 2004-07-27 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * xdisp.c (move_it_in_display_line_to): Check BUFFER_POS_REACHED_P after | ||
| 4 | we have ensured that the glyph fits on the current line (or returned | ||
| 5 | MOVE_LINE_CONTINUED otherwise). | ||
| 6 | |||
| 7 | 2004-07-26 Kim F. Storm <storm@cua.dk> | ||
| 8 | |||
| 9 | * xdisp.c (move_it_in_display_line_to): If overflow-newline-into-fringe | ||
| 10 | is enabled, return MOVE_LINE_CONTINUED rather than MOVE_POS_MATCH_OR_ZV | ||
| 11 | if target position is at end of display line but char is not a newline. | ||
| 12 | |||
| 13 | 2004-07-25 Richard M. Stallman <rms@gnu.org> | ||
| 14 | |||
| 15 | * window.c (coordinates_in_window): Return ON_SCROLL_BAR | ||
| 16 | instead of ON_VERTICAL_BORDER, when on scroll bar. | ||
| 17 | (Fcoordinates_in_window_p): Handle ON_SCROLL_BAR--return nil. | ||
| 18 | |||
| 19 | * dispextern.h (enum window_part): Add ON_SCROLL_BAR. | ||
| 20 | |||
| 21 | * window.c (Fcoordinates_in_window_p): | ||
| 22 | Take account of FRAME_INTERNAL_BORDER_WIDTH. | ||
| 23 | |||
| 24 | * alloc.c (check_cons_list): New function (contents commented out). | ||
| 25 | |||
| 26 | 2004-07-24 Luc Teirlinck <teirllm@auburn.edu> | ||
| 27 | |||
| 28 | * xfaces.c (Fcolor_supported_p): Doc fix. | ||
| 29 | |||
| 30 | * frame.c (Fselect_frame, Fset_frame_selected_window) | ||
| 31 | (Fframe_visible_p, Fraise_frame): Doc fixes. | ||
| 32 | |||
| 33 | 2004-07-24 Richard M. Stallman <rms@gnu.org> | ||
| 34 | |||
| 35 | * keyboard.h (not_single_kboard_state): Declared. | ||
| 36 | |||
| 37 | * fileio.c (Fwrite_region): Doc fix. | ||
| 38 | |||
| 39 | * window.c (Fwindow_at): Take account of FRAME_INTERNAL_BORDER_WIDTH. | ||
| 40 | |||
| 41 | * abbrev.c (Fexpand_abbrev): Run Qpre_abbrev_expand_hook | ||
| 42 | only when a real abbrev is present. | ||
| 43 | |||
| 44 | * xfns.c (x_icon_verify): New function. | ||
| 45 | (Fx_create_frame): Use it. | ||
| 46 | |||
| 1 | 2004-07-22 Barry Fishman <barry_fishman@att.net> (tiny change) | 47 | 2004-07-22 Barry Fishman <barry_fishman@att.net> (tiny change) |
| 2 | 48 | ||
| 3 | * s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined. | 49 | * s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined. |
diff --git a/src/abbrev.c b/src/abbrev.c index 086a58021fb..7e68011955d 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -248,8 +248,6 @@ Returns the abbrev symbol, if expansion took place. */) | |||
| 248 | 248 | ||
| 249 | value = Qnil; | 249 | value = Qnil; |
| 250 | 250 | ||
| 251 | Frun_hooks (1, &Qpre_abbrev_expand_hook); | ||
| 252 | |||
| 253 | wordstart = 0; | 251 | wordstart = 0; |
| 254 | if (!(BUFFERP (Vabbrev_start_location_buffer) | 252 | if (!(BUFFERP (Vabbrev_start_location_buffer) |
| 255 | && XBUFFER (Vabbrev_start_location_buffer) == current_buffer)) | 253 | && XBUFFER (Vabbrev_start_location_buffer) == current_buffer)) |
| @@ -326,6 +324,8 @@ Returns the abbrev symbol, if expansion took place. */) | |||
| 326 | if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym))) | 324 | if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym))) |
| 327 | return value; | 325 | return value; |
| 328 | 326 | ||
| 327 | Frun_hooks (1, &Qpre_abbrev_expand_hook); | ||
| 328 | |||
| 329 | if (INTERACTIVE && !EQ (minibuf_window, selected_window)) | 329 | if (INTERACTIVE && !EQ (minibuf_window, selected_window)) |
| 330 | { | 330 | { |
| 331 | /* Add an undo boundary, in case we are doing this for | 331 | /* Add an undo boundary, in case we are doing this for |
diff --git a/src/alloc.c b/src/alloc.c index 0e3e78bbac2..567b8c7a925 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2395,6 +2395,17 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 2395 | return val; | 2395 | return val; |
| 2396 | } | 2396 | } |
| 2397 | 2397 | ||
| 2398 | /* Get an error now if there's any junk in the cons free list. */ | ||
| 2399 | void | ||
| 2400 | check_cons_list () | ||
| 2401 | { | ||
| 2402 | struct Lisp_Cons *tail = cons_free_list; | ||
| 2403 | |||
| 2404 | #if 0 | ||
| 2405 | while (tail) | ||
| 2406 | tail = *(struct Lisp_Cons **)&tail->cdr; | ||
| 2407 | #endif | ||
| 2408 | } | ||
| 2398 | 2409 | ||
| 2399 | /* Make a list of 2, 3, 4 or 5 specified objects. */ | 2410 | /* Make a list of 2, 3, 4 or 5 specified objects. */ |
| 2400 | 2411 | ||
diff --git a/src/dispextern.h b/src/dispextern.h index 11395cb7f00..43ebe5c24d0 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -99,7 +99,8 @@ enum window_part | |||
| 99 | ON_LEFT_FRINGE, | 99 | ON_LEFT_FRINGE, |
| 100 | ON_RIGHT_FRINGE, | 100 | ON_RIGHT_FRINGE, |
| 101 | ON_LEFT_MARGIN, | 101 | ON_LEFT_MARGIN, |
| 102 | ON_RIGHT_MARGIN | 102 | ON_RIGHT_MARGIN, |
| 103 | ON_SCROLL_BAR | ||
| 103 | }; | 104 | }; |
| 104 | 105 | ||
| 105 | /* Number of bits allocated to store fringe bitmap numbers. */ | 106 | /* Number of bits allocated to store fringe bitmap numbers. */ |
diff --git a/src/fileio.c b/src/fileio.c index bbc7d86c429..a22216040f3 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4829,7 +4829,7 @@ instead of any buffer contents; END is ignored. | |||
| 4829 | Optional fourth argument APPEND if non-nil means | 4829 | Optional fourth argument APPEND if non-nil means |
| 4830 | append to existing file contents (if any). If it is an integer, | 4830 | append to existing file contents (if any). If it is an integer, |
| 4831 | seek to that offset in the file before writing. | 4831 | seek to that offset in the file before writing. |
| 4832 | Optional fifth argument VISIT if t means | 4832 | Optional fifth argument VISIT, if t or a string, means |
| 4833 | set the last-save-file-modtime of buffer to this file's modtime | 4833 | set the last-save-file-modtime of buffer to this file's modtime |
| 4834 | and mark buffer not modified. | 4834 | and mark buffer not modified. |
| 4835 | If VISIT is a string, it is a second file name; | 4835 | If VISIT is a string, it is a second file name; |
diff --git a/src/frame.c b/src/frame.c index 41b92e75dbb..d7da02db278 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Generic frame functions. | 1 | /* Generic frame functions. |
| 2 | Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003 | 2 | Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003, 2004 |
| 3 | Free Software Foundation. | 3 | Free Software Foundation. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -733,7 +733,12 @@ DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", | |||
| 733 | Subsequent editing commands apply to its selected window. | 733 | Subsequent editing commands apply to its selected window. |
| 734 | The selection of FRAME lasts until the next time the user does | 734 | The selection of FRAME lasts until the next time the user does |
| 735 | something to select a different frame, or until the next time this | 735 | something to select a different frame, or until the next time this |
| 736 | function is called. */) | 736 | function is called. If you are using a window system, the previously |
| 737 | selected frame may be restored as the selected frame after return to | ||
| 738 | the command loop, because it still may have the window system's input | ||
| 739 | focus. On a text-only terminal, the next redisplay will display FRAME. | ||
| 740 | |||
| 741 | This function returns FRAME, or nil if FRAME has been deleted. */) | ||
| 737 | (frame, no_enter) | 742 | (frame, no_enter) |
| 738 | Lisp_Object frame, no_enter; | 743 | Lisp_Object frame, no_enter; |
| 739 | { | 744 | { |
| @@ -861,6 +866,7 @@ If omitted, FRAME defaults to the currently selected frame. */) | |||
| 861 | DEFUN ("set-frame-selected-window", Fset_frame_selected_window, | 866 | DEFUN ("set-frame-selected-window", Fset_frame_selected_window, |
| 862 | Sset_frame_selected_window, 2, 2, 0, | 867 | Sset_frame_selected_window, 2, 2, 0, |
| 863 | doc: /* Set the selected window of frame object FRAME to WINDOW. | 868 | doc: /* Set the selected window of frame object FRAME to WINDOW. |
| 869 | Return WINDOW. | ||
| 864 | If FRAME is nil, the selected frame is used. | 870 | If FRAME is nil, the selected frame is used. |
| 865 | If FRAME is the selected frame, this makes WINDOW the selected window. */) | 871 | If FRAME is the selected frame, this makes WINDOW the selected window. */) |
| 866 | (frame, window) | 872 | (frame, window) |
| @@ -1711,7 +1717,11 @@ DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p, | |||
| 1711 | doc: /* Return t if FRAME is now \"visible\" (actually in use for display). | 1717 | doc: /* Return t if FRAME is now \"visible\" (actually in use for display). |
| 1712 | A frame that is not \"visible\" is not updated and, if it works through | 1718 | A frame that is not \"visible\" is not updated and, if it works through |
| 1713 | a window system, it may not show at all. | 1719 | a window system, it may not show at all. |
| 1714 | Return the symbol `icon' if frame is visible only as an icon. */) | 1720 | Return the symbol `icon' if frame is visible only as an icon. |
| 1721 | |||
| 1722 | On a text-only terminal, all frames are considered visible, whether | ||
| 1723 | they are currently being displayed or not, and this function returns t | ||
| 1724 | for all frames. */) | ||
| 1715 | (frame) | 1725 | (frame) |
| 1716 | Lisp_Object frame; | 1726 | Lisp_Object frame; |
| 1717 | { | 1727 | { |
| @@ -1751,7 +1761,7 @@ DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list, | |||
| 1751 | 1761 | ||
| 1752 | DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "", | 1762 | DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "", |
| 1753 | doc: /* Bring FRAME to the front, so it occludes any frames it overlaps. | 1763 | doc: /* Bring FRAME to the front, so it occludes any frames it overlaps. |
| 1754 | If FRAME is invisible, make it visible. | 1764 | If FRAME is invisible or iconified, make it visible. |
| 1755 | If you don't specify a frame, the selected frame is used. | 1765 | If you don't specify a frame, the selected frame is used. |
| 1756 | If Emacs is displaying on an ordinary terminal or some other device which | 1766 | If Emacs is displaying on an ordinary terminal or some other device which |
| 1757 | doesn't support multiple overlapping frames, this function does nothing. */) | 1767 | doesn't support multiple overlapping frames, this function does nothing. */) |
diff --git a/src/keyboard.h b/src/keyboard.h index d92f13a5059..4e14257359f 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -307,6 +307,7 @@ extern void echo_now P_ ((void)); | |||
| 307 | extern void init_kboard P_ ((KBOARD *)); | 307 | extern void init_kboard P_ ((KBOARD *)); |
| 308 | extern void delete_kboard P_ ((KBOARD *)); | 308 | extern void delete_kboard P_ ((KBOARD *)); |
| 309 | extern void single_kboard_state P_ ((void)); | 309 | extern void single_kboard_state P_ ((void)); |
| 310 | extern void not_single_kboard_state P_ ((KBOARD *)); | ||
| 310 | extern void push_frame_kboard P_ ((struct frame *)); | 311 | extern void push_frame_kboard P_ ((struct frame *)); |
| 311 | extern void pop_frame_kboard P_ ((void)); | 312 | extern void pop_frame_kboard P_ ((void)); |
| 312 | extern void record_asynch_buffer_change P_ ((void)); | 313 | extern void record_asynch_buffer_change P_ ((void)); |
diff --git a/src/window.c b/src/window.c index 1b1cab13e7a..9c94a43c3cd 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -579,6 +579,8 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 579 | if it is on the window's modeline, return ON_MODE_LINE; | 579 | if it is on the window's modeline, return ON_MODE_LINE; |
| 580 | if it is on the border between the window and its right sibling, | 580 | if it is on the border between the window and its right sibling, |
| 581 | return ON_VERTICAL_BORDER. | 581 | return ON_VERTICAL_BORDER. |
| 582 | if it is on a scroll bar, | ||
| 583 | return ON_SCROLL_BAR. | ||
| 582 | if it is on the window's top line, return ON_HEADER_LINE; | 584 | if it is on the window's top line, return ON_HEADER_LINE; |
| 583 | if it is in left or right fringe of the window, | 585 | if it is in left or right fringe of the window, |
| 584 | return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y | 586 | return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y |
| @@ -673,7 +675,7 @@ coordinates_in_window (w, x, y) | |||
| 673 | 675 | ||
| 674 | /* Outside any interesting column? */ | 676 | /* Outside any interesting column? */ |
| 675 | if (*x < left_x || *x > right_x) | 677 | if (*x < left_x || *x > right_x) |
| 676 | return ON_VERTICAL_BORDER; | 678 | return ON_SCROLL_BAR; |
| 677 | 679 | ||
| 678 | lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); | 680 | lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); |
| 679 | rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); | 681 | rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); |
| @@ -783,8 +785,8 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ | |||
| 783 | ly = Fcdr (coordinates); | 785 | ly = Fcdr (coordinates); |
| 784 | CHECK_NUMBER_OR_FLOAT (lx); | 786 | CHECK_NUMBER_OR_FLOAT (lx); |
| 785 | CHECK_NUMBER_OR_FLOAT (ly); | 787 | CHECK_NUMBER_OR_FLOAT (ly); |
| 786 | x = FRAME_PIXEL_X_FROM_CANON_X (f, lx); | 788 | x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f); |
| 787 | y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly); | 789 | y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f); |
| 788 | 790 | ||
| 789 | switch (coordinates_in_window (w, &x, &y)) | 791 | switch (coordinates_in_window (w, &x, &y)) |
| 790 | { | 792 | { |
| @@ -818,6 +820,10 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ | |||
| 818 | case ON_RIGHT_MARGIN: | 820 | case ON_RIGHT_MARGIN: |
| 819 | return Qright_margin; | 821 | return Qright_margin; |
| 820 | 822 | ||
| 823 | case ON_SCROLL_BAR: | ||
| 824 | /* Historically we are supposed to return nil in this case. */ | ||
| 825 | return Qnil; | ||
| 826 | |||
| 821 | default: | 827 | default: |
| 822 | abort (); | 828 | abort (); |
| 823 | } | 829 | } |
| @@ -938,8 +944,10 @@ column 0. */) | |||
| 938 | CHECK_NUMBER_OR_FLOAT (y); | 944 | CHECK_NUMBER_OR_FLOAT (y); |
| 939 | 945 | ||
| 940 | return window_from_coordinates (f, | 946 | return window_from_coordinates (f, |
| 941 | FRAME_PIXEL_X_FROM_CANON_X (f, x), | 947 | (FRAME_PIXEL_X_FROM_CANON_X (f, x) |
| 942 | FRAME_PIXEL_Y_FROM_CANON_Y (f, y), | 948 | + FRAME_INTERNAL_BORDER_WIDTH (f)), |
| 949 | (FRAME_PIXEL_Y_FROM_CANON_Y (f, y) | ||
| 950 | + FRAME_INTERNAL_BORDER_WIDTH (f)), | ||
| 943 | 0, 0, 0, 0); | 951 | 0, 0, 0, 0); |
| 944 | } | 952 | } |
| 945 | 953 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 3a4ff4d2ac0..463889507e4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5750,9 +5750,13 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5750 | { | 5750 | { |
| 5751 | int x, i, ascent = 0, descent = 0; | 5751 | int x, i, ascent = 0, descent = 0; |
| 5752 | 5752 | ||
| 5753 | /* Stop when ZV or TO_CHARPOS reached. */ | 5753 | /* Stop when ZV reached. |
| 5754 | We used to stop here when TO_CHARPOS reached as well, but that is | ||
| 5755 | too soon if this glyph does not fit on this line. So we handle it | ||
| 5756 | explicitly below. */ | ||
| 5754 | if (!get_next_display_element (it) | 5757 | if (!get_next_display_element (it) |
| 5755 | || BUFFER_POS_REACHED_P ()) | 5758 | || (it->truncate_lines_p |
| 5759 | && BUFFER_POS_REACHED_P ())) | ||
| 5756 | { | 5760 | { |
| 5757 | result = MOVE_POS_MATCH_OR_ZV; | 5761 | result = MOVE_POS_MATCH_OR_ZV; |
| 5758 | break; | 5762 | break; |
| @@ -5812,6 +5816,8 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5812 | /* We want to leave anything reaching TO_X to the caller. */ | 5816 | /* We want to leave anything reaching TO_X to the caller. */ |
| 5813 | if ((op & MOVE_TO_X) && new_x > to_x) | 5817 | if ((op & MOVE_TO_X) && new_x > to_x) |
| 5814 | { | 5818 | { |
| 5819 | if (BUFFER_POS_REACHED_P ()) | ||
| 5820 | goto buffer_pos_reached; | ||
| 5815 | it->current_x = x; | 5821 | it->current_x = x; |
| 5816 | result = MOVE_X_REACHED; | 5822 | result = MOVE_X_REACHED; |
| 5817 | break; | 5823 | break; |
| @@ -5839,12 +5845,19 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5839 | #ifdef HAVE_WINDOW_SYSTEM | 5845 | #ifdef HAVE_WINDOW_SYSTEM |
| 5840 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) | 5846 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) |
| 5841 | { | 5847 | { |
| 5842 | if (!get_next_display_element (it) | 5848 | if (!get_next_display_element (it)) |
| 5843 | || BUFFER_POS_REACHED_P ()) | ||
| 5844 | { | 5849 | { |
| 5845 | result = MOVE_POS_MATCH_OR_ZV; | 5850 | result = MOVE_POS_MATCH_OR_ZV; |
| 5846 | break; | 5851 | break; |
| 5847 | } | 5852 | } |
| 5853 | if (BUFFER_POS_REACHED_P ()) | ||
| 5854 | { | ||
| 5855 | if (ITERATOR_AT_END_OF_LINE_P (it)) | ||
| 5856 | result = MOVE_POS_MATCH_OR_ZV; | ||
| 5857 | else | ||
| 5858 | result = MOVE_LINE_CONTINUED; | ||
| 5859 | break; | ||
| 5860 | } | ||
| 5848 | if (ITERATOR_AT_END_OF_LINE_P (it)) | 5861 | if (ITERATOR_AT_END_OF_LINE_P (it)) |
| 5849 | { | 5862 | { |
| 5850 | result = MOVE_NEWLINE_OR_CR; | 5863 | result = MOVE_NEWLINE_OR_CR; |
| @@ -5866,6 +5879,8 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5866 | result = MOVE_LINE_CONTINUED; | 5879 | result = MOVE_LINE_CONTINUED; |
| 5867 | break; | 5880 | break; |
| 5868 | } | 5881 | } |
| 5882 | else if (BUFFER_POS_REACHED_P ()) | ||
| 5883 | goto buffer_pos_reached; | ||
| 5869 | else if (new_x > it->first_visible_x) | 5884 | else if (new_x > it->first_visible_x) |
| 5870 | { | 5885 | { |
| 5871 | /* Glyph is visible. Increment number of glyphs that | 5886 | /* Glyph is visible. Increment number of glyphs that |
| @@ -5882,6 +5897,15 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5882 | if (result != MOVE_UNDEFINED) | 5897 | if (result != MOVE_UNDEFINED) |
| 5883 | break; | 5898 | break; |
| 5884 | } | 5899 | } |
| 5900 | else if (BUFFER_POS_REACHED_P ()) | ||
| 5901 | { | ||
| 5902 | buffer_pos_reached: | ||
| 5903 | it->current_x = x; | ||
| 5904 | it->max_ascent = ascent; | ||
| 5905 | it->max_descent = descent; | ||
| 5906 | result = MOVE_POS_MATCH_OR_ZV; | ||
| 5907 | break; | ||
| 5908 | } | ||
| 5885 | else if ((op & MOVE_TO_X) && it->current_x >= to_x) | 5909 | else if ((op & MOVE_TO_X) && it->current_x >= to_x) |
| 5886 | { | 5910 | { |
| 5887 | /* Stop when TO_X specified and reached. This check is | 5911 | /* Stop when TO_X specified and reached. This check is |
diff --git a/src/xfaces.c b/src/xfaces.c index 6ee06ba5f76..0a81342e96d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -1542,6 +1542,7 @@ DEFUN ("color-supported-p", Fcolor_supported_p, | |||
| 1542 | Scolor_supported_p, 1, 3, 0, | 1542 | Scolor_supported_p, 1, 3, 0, |
| 1543 | doc: /* Return non-nil if COLOR can be displayed on FRAME. | 1543 | doc: /* Return non-nil if COLOR can be displayed on FRAME. |
| 1544 | BACKGROUND-P non-nil means COLOR is used as a background. | 1544 | BACKGROUND-P non-nil means COLOR is used as a background. |
| 1545 | Otherwise, this function tells whether it can be used as a foreground. | ||
| 1545 | If FRAME is nil or omitted, use the selected frame. | 1546 | If FRAME is nil or omitted, use the selected frame. |
| 1546 | COLOR must be a valid color name. */) | 1547 | COLOR must be a valid color name. */) |
| 1547 | (color, frame, background_p) | 1548 | (color, frame, background_p) |
diff --git a/src/xfns.c b/src/xfns.c index cdbce00fe4c..8d182a6788b 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2613,6 +2613,28 @@ x_window (f) | |||
| 2613 | #endif /* not USE_GTK */ | 2613 | #endif /* not USE_GTK */ |
| 2614 | #endif /* not USE_X_TOOLKIT */ | 2614 | #endif /* not USE_X_TOOLKIT */ |
| 2615 | 2615 | ||
| 2616 | /* Verify that the icon position args for this window are valid. */ | ||
| 2617 | |||
| 2618 | static void | ||
| 2619 | x_icon_verify (f, parms) | ||
| 2620 | struct frame *f; | ||
| 2621 | Lisp_Object parms; | ||
| 2622 | { | ||
| 2623 | Lisp_Object icon_x, icon_y; | ||
| 2624 | |||
| 2625 | /* Set the position of the icon. Note that twm groups all | ||
| 2626 | icons in an icon window. */ | ||
| 2627 | icon_x = x_frame_get_and_record_arg (f, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER); | ||
| 2628 | icon_y = x_frame_get_and_record_arg (f, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER); | ||
| 2629 | if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound)) | ||
| 2630 | { | ||
| 2631 | CHECK_NUMBER (icon_x); | ||
| 2632 | CHECK_NUMBER (icon_y); | ||
| 2633 | } | ||
| 2634 | else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound)) | ||
| 2635 | error ("Both left and top icon corners of icon must be specified"); | ||
| 2636 | } | ||
| 2637 | |||
| 2616 | /* Handle the icon stuff for this window. Perhaps later we might | 2638 | /* Handle the icon stuff for this window. Perhaps later we might |
| 2617 | want an x_set_icon_position which can be called interactively as | 2639 | want an x_set_icon_position which can be called interactively as |
| 2618 | well. */ | 2640 | well. */ |
| @@ -3101,6 +3123,8 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3101 | tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); | 3123 | tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); |
| 3102 | f->no_split = minibuffer_only || EQ (tem, Qt); | 3124 | f->no_split = minibuffer_only || EQ (tem, Qt); |
| 3103 | 3125 | ||
| 3126 | x_icon_verify (f, parms); | ||
| 3127 | |||
| 3104 | /* Create the X widget or window. */ | 3128 | /* Create the X widget or window. */ |
| 3105 | #ifdef USE_X_TOOLKIT | 3129 | #ifdef USE_X_TOOLKIT |
| 3106 | x_window (f, window_prompting, minibuffer_only); | 3130 | x_window (f, window_prompting, minibuffer_only); |