diff options
| author | Miles Bader | 2007-04-24 21:56:25 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-04-24 21:56:25 +0000 |
| commit | 991a760232de757d71d8dbbed47ee12d81e29d53 (patch) | |
| tree | 2440730c37ae3f167a50f5c3ac5eaeab9b72b7b0 /src | |
| parent | 0bb328f8f6fce06a7fc65670c7d5c011b613e1c5 (diff) | |
| parent | 3851329262d6558d5e1a93157d44777d0a39e38e (diff) | |
| download | emacs-991a760232de757d71d8dbbed47ee12d81e29d53.tar.gz emacs-991a760232de757d71d8dbbed47ee12d81e29d53.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 698-710)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 216)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 83 | ||||
| -rw-r--r-- | src/abbrev.c | 2 | ||||
| -rw-r--r-- | src/alloc.c | 4 | ||||
| -rw-r--r-- | src/buffer.c | 9 | ||||
| -rw-r--r-- | src/dispnew.c | 35 | ||||
| -rw-r--r-- | src/keymap.c | 3 | ||||
| -rw-r--r-- | src/mac.c | 7 | ||||
| -rw-r--r-- | src/macterm.c | 212 | ||||
| -rw-r--r-- | src/minibuf.c | 10 | ||||
| -rw-r--r-- | src/process.c | 14 | ||||
| -rw-r--r-- | src/sysdep.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 62 |
12 files changed, 333 insertions, 112 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 61e6de2c97d..e3c660dbbab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,86 @@ | |||
| 1 | 2007-04-24 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * xdisp.c (redisplay_window): Use BEG_UNCHANGED and END_UNCHANGED | ||
| 4 | values of the actual window. | ||
| 5 | |||
| 6 | 2007-04-23 Richard Stallman <rms@gnu.org> | ||
| 7 | |||
| 8 | * process.c (Fstart_process): Doc fix. | ||
| 9 | |||
| 10 | 2007-04-23 Eli Zaretskii <eliz@gnu.org> | ||
| 11 | |||
| 12 | * process.c (Fstart_process): Doc fix. | ||
| 13 | |||
| 14 | 2007-04-22 Richard Stallman <rms@gnu.org> | ||
| 15 | |||
| 16 | * abbrev.c (Fdefine_abbrev): Doc fix. | ||
| 17 | |||
| 18 | * keymap.c (Fdefine_key): Minor doc fix. | ||
| 19 | |||
| 20 | 2007-04-21 Glenn Morris <rgm@gnu.org> | ||
| 21 | |||
| 22 | * keymap.c (Fdefine_key): Fix info ref in doc string. | ||
| 23 | |||
| 24 | 2007-04-20 Glenn Morris <rgm@gnu.org> | ||
| 25 | |||
| 26 | * sysdep.c (init_system_name): Don't accept localhost.localdomain. | ||
| 27 | |||
| 28 | 2007-04-19 Juanma Barranquero <lekktu@gmail.com> | ||
| 29 | |||
| 30 | * minibuf.c (Fminibuffer_contents, Fminibuffer_contents_no_properties) | ||
| 31 | (Fminibuffer_completion_contents, Fdelete_minibuffer_contents): | ||
| 32 | Doc fixes. | ||
| 33 | |||
| 34 | 2007-04-16 Chong Yidong <cyd@stupidchicken.com> | ||
| 35 | |||
| 36 | * dispnew.c (adjust_frame_glyphs_for_frame_redisplay): Set | ||
| 37 | garbaged flag in presence of window margins. | ||
| 38 | (showing_window_margins_p): New function. | ||
| 39 | |||
| 40 | * xdisp.c (cursor_row_p): Only end row on newline if it's a | ||
| 41 | display string. Suggested by Lennart Borgman. | ||
| 42 | |||
| 43 | 2007-04-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 44 | |||
| 45 | * alloc.c (mem_insert): Set min_heap_address and max_heap_address | ||
| 46 | if they are not yet initialized. | ||
| 47 | |||
| 48 | 2007-04-15 Chong Yidong <cyd@stupidchicken.com> | ||
| 49 | |||
| 50 | * xdisp.c (redisplay_window): When deciding whether or not to | ||
| 51 | recenter, don't use the reset values of BEG_UNCHANGED and | ||
| 52 | END_UNCHANGED. | ||
| 53 | |||
| 54 | 2007-04-13 Kim F. Storm <storm@cua.dk> | ||
| 55 | |||
| 56 | * buffer.c (Fkill_buffer): gcpro BUF during kill_buffer_processes | ||
| 57 | and check that buffer is still alive upon return. | ||
| 58 | |||
| 59 | 2007-04-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 60 | |||
| 61 | * macterm.c [!TARGET_API_MAC_CARBON]: Include Displays.h. | ||
| 62 | (mac_screen_config_changed): New variable. | ||
| 63 | (mac_handle_dm_notification, init_dm_notification_handler) | ||
| 64 | (mac_get_screen_info): New functions. | ||
| 65 | [MAC_OS8] (main): Call init_dm_notification_handler. | ||
| 66 | (mac_initialize) [MAC_OSX]: Likewise. | ||
| 67 | (XTread_socket): Call mac_get_screen_info if screen config changed. | ||
| 68 | (mac_initialized): Make static. | ||
| 69 | (mac_initialize_display_info): Remove function. | ||
| 70 | (mac_term_init): Call mac_get_screen_info. Add partial contents of | ||
| 71 | mac_initialize_display_info. | ||
| 72 | |||
| 73 | 2007-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 74 | |||
| 75 | * mac.c (xrm_get_preference_database, Fmac_get_preference) | ||
| 76 | [TARGET_API_MAC_CARBON]: Use CFPreferencesAppSynchronize. | ||
| 77 | |||
| 78 | * macterm.c [TARGET_API_MAC_CARBON] (mac_post_mouse_moved_event): | ||
| 79 | Use GetGlobalMouse instead of GetMouse and LocalToGlobal. | ||
| 80 | (mac_initialize_display_info) [MAC_OSX]: Use CGRectZero. | ||
| 81 | (mac_initialize_display_info) [!MAC_OSX]: dpyinfo->height and | ||
| 82 | dpyinfo->width are those of whole screen. | ||
| 83 | |||
| 1 | 2007-04-10 Chong Yidong <cyd@stupidchicken.com> | 84 | 2007-04-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 85 | ||
| 3 | * xdisp.c (note_mode_line_or_margin_highlight): Don't decrement | 86 | * xdisp.c (note_mode_line_or_margin_highlight): Don't decrement |
diff --git a/src/abbrev.c b/src/abbrev.c index 8e9bd143089..cb8e334591c 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -110,7 +110,7 @@ DEFUN ("clear-abbrev-table", Fclear_abbrev_table, Sclear_abbrev_table, 1, 1, 0, | |||
| 110 | 110 | ||
| 111 | DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0, | 111 | DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0, |
| 112 | doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. | 112 | doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. |
| 113 | NAME must be a string. | 113 | NAME must be a string, and should be lower-case. |
| 114 | EXPANSION should usually be a string. | 114 | EXPANSION should usually be a string. |
| 115 | To undefine an abbrev, define it with EXPANSION = nil. | 115 | To undefine an abbrev, define it with EXPANSION = nil. |
| 116 | If HOOK is non-nil, it should be a function of no arguments; | 116 | If HOOK is non-nil, it should be a function of no arguments; |
diff --git a/src/alloc.c b/src/alloc.c index f847b4052b7..6c757567354 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3572,9 +3572,9 @@ mem_insert (start, end, type) | |||
| 3572 | { | 3572 | { |
| 3573 | struct mem_node *c, *parent, *x; | 3573 | struct mem_node *c, *parent, *x; |
| 3574 | 3574 | ||
| 3575 | if (start < min_heap_address) | 3575 | if (min_heap_address == NULL || start < min_heap_address) |
| 3576 | min_heap_address = start; | 3576 | min_heap_address = start; |
| 3577 | if (end > max_heap_address) | 3577 | if (max_heap_address == NULL || end > max_heap_address) |
| 3578 | max_heap_address = end; | 3578 | max_heap_address = end; |
| 3579 | 3579 | ||
| 3580 | /* See where in the tree a node for START belongs. In this | 3580 | /* See where in the tree a node for START belongs. In this |
diff --git a/src/buffer.c b/src/buffer.c index 09166b17cfb..895bb2b32e8 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1459,7 +1459,16 @@ with SIGHUP. */) | |||
| 1459 | unlock_buffer (b); | 1459 | unlock_buffer (b); |
| 1460 | #endif /* CLASH_DETECTION */ | 1460 | #endif /* CLASH_DETECTION */ |
| 1461 | 1461 | ||
| 1462 | GCPRO1 (buf); | ||
| 1462 | kill_buffer_processes (buf); | 1463 | kill_buffer_processes (buf); |
| 1464 | UNGCPRO; | ||
| 1465 | |||
| 1466 | /* Killing buffer processes may run sentinels which may | ||
| 1467 | have called kill-buffer. */ | ||
| 1468 | |||
| 1469 | if (NILP (b->name)) | ||
| 1470 | return Qnil; | ||
| 1471 | |||
| 1463 | clear_charpos_cache (b); | 1472 | clear_charpos_cache (b); |
| 1464 | 1473 | ||
| 1465 | tem = Vinhibit_quit; | 1474 | tem = Vinhibit_quit; |
diff --git a/src/dispnew.c b/src/dispnew.c index 313221f43f5..c3434c915f3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -120,6 +120,7 @@ struct dim | |||
| 120 | 120 | ||
| 121 | static struct glyph_matrix *save_current_matrix P_ ((struct frame *)); | 121 | static struct glyph_matrix *save_current_matrix P_ ((struct frame *)); |
| 122 | static void restore_current_matrix P_ ((struct frame *, struct glyph_matrix *)); | 122 | static void restore_current_matrix P_ ((struct frame *, struct glyph_matrix *)); |
| 123 | static int showing_window_margins_p P_ ((struct window *)); | ||
| 123 | static void fake_current_matrices P_ ((Lisp_Object)); | 124 | static void fake_current_matrices P_ ((Lisp_Object)); |
| 124 | static void redraw_overlapping_rows P_ ((struct window *, int)); | 125 | static void redraw_overlapping_rows P_ ((struct window *, int)); |
| 125 | static void redraw_overlapped_rows P_ ((struct window *, int)); | 126 | static void redraw_overlapped_rows P_ ((struct window *, int)); |
| @@ -2164,6 +2165,33 @@ adjust_frame_glyphs (f) | |||
| 2164 | f->glyphs_initialized_p = 1; | 2165 | f->glyphs_initialized_p = 1; |
| 2165 | } | 2166 | } |
| 2166 | 2167 | ||
| 2168 | /* Return 1 if any window in the tree has nonzero window margins. See | ||
| 2169 | the hack at the end of adjust_frame_glyphs_for_frame_redisplay. */ | ||
| 2170 | static int | ||
| 2171 | showing_window_margins_p (w) | ||
| 2172 | struct window *w; | ||
| 2173 | { | ||
| 2174 | while (w) | ||
| 2175 | { | ||
| 2176 | if (!NILP (w->hchild)) | ||
| 2177 | { | ||
| 2178 | if (showing_window_margins_p (XWINDOW (w->hchild))) | ||
| 2179 | return 1; | ||
| 2180 | } | ||
| 2181 | else if (!NILP (w->vchild)) | ||
| 2182 | { | ||
| 2183 | if (showing_window_margins_p (XWINDOW (w->vchild))) | ||
| 2184 | return 1; | ||
| 2185 | } | ||
| 2186 | else if (!NILP (w->left_margin_cols) | ||
| 2187 | || !NILP (w->right_margin_cols)) | ||
| 2188 | return 1; | ||
| 2189 | |||
| 2190 | w = NILP (w->next) ? 0 : XWINDOW (w->next); | ||
| 2191 | } | ||
| 2192 | return 0; | ||
| 2193 | } | ||
| 2194 | |||
| 2167 | 2195 | ||
| 2168 | /* In the window tree with root W, build current matrices of leaf | 2196 | /* In the window tree with root W, build current matrices of leaf |
| 2169 | windows from the frame's current matrix. */ | 2197 | windows from the frame's current matrix. */ |
| @@ -2351,7 +2379,12 @@ adjust_frame_glyphs_for_frame_redisplay (f) | |||
| 2351 | if (display_completed | 2379 | if (display_completed |
| 2352 | && !FRAME_GARBAGED_P (f) | 2380 | && !FRAME_GARBAGED_P (f) |
| 2353 | && matrix_dim.width == f->current_matrix->matrix_w | 2381 | && matrix_dim.width == f->current_matrix->matrix_w |
| 2354 | && matrix_dim.height == f->current_matrix->matrix_h) | 2382 | && matrix_dim.height == f->current_matrix->matrix_h |
| 2383 | /* For some reason, the frame glyph matrix gets corrupted if | ||
| 2384 | any of the windows contain margins. I haven't been able | ||
| 2385 | to hunt down the reason, but for the moment this prevents | ||
| 2386 | the problem from manifesting. -- cyd */ | ||
| 2387 | && !showing_window_margins_p (XWINDOW (FRAME_ROOT_WINDOW (f)))) | ||
| 2355 | { | 2388 | { |
| 2356 | struct glyph_matrix *copy = save_current_matrix (f); | 2389 | struct glyph_matrix *copy = save_current_matrix (f); |
| 2357 | adjust_glyph_matrix (NULL, f->desired_matrix, 0, 0, matrix_dim); | 2390 | adjust_glyph_matrix (NULL, f->desired_matrix, 0, 0, matrix_dim); |
diff --git a/src/keymap.c b/src/keymap.c index d953df008d7..4a5c53ca626 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1148,7 +1148,8 @@ DEF is anything that can be a key's definition: | |||
| 1148 | a cons (STRING . DEFN), meaning that DEFN is the definition | 1148 | a cons (STRING . DEFN), meaning that DEFN is the definition |
| 1149 | (DEFN should be a valid definition in its own right), | 1149 | (DEFN should be a valid definition in its own right), |
| 1150 | or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP, | 1150 | or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP, |
| 1151 | or an extended menu item definition. (See info node `Extended Menu Items'.) | 1151 | or an extended menu item definition. |
| 1152 | (See info node `(elisp)Extended Menu Items'.) | ||
| 1152 | 1153 | ||
| 1153 | If KEYMAP is a sparse keymap with a binding for KEY, the existing | 1154 | If KEYMAP is a sparse keymap with a binding for KEY, the existing |
| 1154 | binding is altered. If there is no binding for KEY, the new pair | 1155 | binding is altered. If there is no binding for KEY, the new pair |
| @@ -1835,6 +1835,8 @@ xrm_get_preference_database (application) | |||
| 1835 | if (app_id == NULL) | 1835 | if (app_id == NULL) |
| 1836 | goto out; | 1836 | goto out; |
| 1837 | } | 1837 | } |
| 1838 | if (!CFPreferencesAppSynchronize (app_id)) | ||
| 1839 | goto out; | ||
| 1838 | 1840 | ||
| 1839 | key_set = CFSetCreateMutable (NULL, 0, &kCFCopyStringSetCallBacks); | 1841 | key_set = CFSetCreateMutable (NULL, 0, &kCFCopyStringSetCallBacks); |
| 1840 | if (key_set == NULL) | 1842 | if (key_set == NULL) |
| @@ -4650,6 +4652,9 @@ otherwise. */) | |||
| 4650 | if (app_id == NULL) | 4652 | if (app_id == NULL) |
| 4651 | goto out; | 4653 | goto out; |
| 4652 | } | 4654 | } |
| 4655 | if (!CFPreferencesAppSynchronize (app_id)) | ||
| 4656 | goto out; | ||
| 4657 | |||
| 4653 | key_str = cfstring_create_with_string (XCAR (key)); | 4658 | key_str = cfstring_create_with_string (XCAR (key)); |
| 4654 | if (key_str == NULL) | 4659 | if (key_str == NULL) |
| 4655 | goto out; | 4660 | goto out; |
| @@ -4986,7 +4991,7 @@ extern int noninteractive; | |||
| 4986 | 3. [If SELECT_USE_CFSOCKET is set] | 4991 | 3. [If SELECT_USE_CFSOCKET is set] |
| 4987 | Only the window event channel and socket read/write channels are | 4992 | Only the window event channel and socket read/write channels are |
| 4988 | involved, and timeout is not too short (greater than | 4993 | involved, and timeout is not too short (greater than |
| 4989 | SELECT_TIMEOUT_THRESHHOLD_RUNLOOP seconds). | 4994 | SELECT_TIMEOUT_THRESHOLD_RUNLOOP seconds). |
| 4990 | -> Create CFSocket for each socket and add it into the current | 4995 | -> Create CFSocket for each socket and add it into the current |
| 4991 | event RunLoop so that the current event loop gets quit when | 4996 | event RunLoop so that the current event loop gets quit when |
| 4992 | the socket becomes ready. Then ReceiveNextEvent can wait for | 4997 | the socket becomes ready. Then ReceiveNextEvent can wait for |
diff --git a/src/macterm.c b/src/macterm.c index 596d74cddd9..df0275fe22b 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -52,6 +52,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 52 | #include <LowMem.h> | 52 | #include <LowMem.h> |
| 53 | #include <Controls.h> | 53 | #include <Controls.h> |
| 54 | #include <Windows.h> | 54 | #include <Windows.h> |
| 55 | #include <Displays.h> | ||
| 55 | #if defined (__MRC__) || (__MSL__ >= 0x6000) | 56 | #if defined (__MRC__) || (__MSL__ >= 0x6000) |
| 56 | #include <ControlDefinitions.h> | 57 | #include <ControlDefinitions.h> |
| 57 | #endif | 58 | #endif |
| @@ -8890,6 +8891,9 @@ int mac_pass_control_to_system; | |||
| 8890 | Carbon/Apple event handlers. */ | 8891 | Carbon/Apple event handlers. */ |
| 8891 | static struct input_event *read_socket_inev = NULL; | 8892 | static struct input_event *read_socket_inev = NULL; |
| 8892 | 8893 | ||
| 8894 | /* Whether or not the screen configuration has changed. */ | ||
| 8895 | static int mac_screen_config_changed = 0; | ||
| 8896 | |||
| 8893 | Point saved_menu_event_location; | 8897 | Point saved_menu_event_location; |
| 8894 | 8898 | ||
| 8895 | /* Apple Events */ | 8899 | /* Apple Events */ |
| @@ -10420,6 +10424,87 @@ remove_window_handler (window) | |||
| 10420 | } | 10424 | } |
| 10421 | 10425 | ||
| 10422 | 10426 | ||
| 10427 | static pascal void | ||
| 10428 | mac_handle_dm_notification (event) | ||
| 10429 | AppleEvent *event; | ||
| 10430 | { | ||
| 10431 | mac_screen_config_changed = 1; | ||
| 10432 | } | ||
| 10433 | |||
| 10434 | static OSErr | ||
| 10435 | init_dm_notification_handler () | ||
| 10436 | { | ||
| 10437 | OSErr err; | ||
| 10438 | static DMNotificationUPP handle_dm_notificationUPP = NULL; | ||
| 10439 | ProcessSerialNumber psn; | ||
| 10440 | |||
| 10441 | if (handle_dm_notificationUPP == NULL) | ||
| 10442 | handle_dm_notificationUPP = | ||
| 10443 | NewDMNotificationUPP (mac_handle_dm_notification); | ||
| 10444 | |||
| 10445 | err = GetCurrentProcess (&psn); | ||
| 10446 | if (err == noErr) | ||
| 10447 | err = DMRegisterNotifyProc (handle_dm_notificationUPP, &psn); | ||
| 10448 | |||
| 10449 | return err; | ||
| 10450 | } | ||
| 10451 | |||
| 10452 | static void | ||
| 10453 | mac_get_screen_info (dpyinfo) | ||
| 10454 | struct mac_display_info *dpyinfo; | ||
| 10455 | { | ||
| 10456 | #ifdef MAC_OSX | ||
| 10457 | /* HasDepth returns true if it is possible to have a 32 bit display, | ||
| 10458 | but this may not be what is actually used. Mac OSX can do better. */ | ||
| 10459 | dpyinfo->color_p = CGDisplaySamplesPerPixel (kCGDirectMainDisplay) > 1; | ||
| 10460 | dpyinfo->n_planes = CGDisplayBitsPerPixel (kCGDirectMainDisplay); | ||
| 10461 | { | ||
| 10462 | CGDisplayErr err; | ||
| 10463 | CGDisplayCount ndisps; | ||
| 10464 | CGDirectDisplayID *displays; | ||
| 10465 | |||
| 10466 | err = CGGetActiveDisplayList (0, NULL, &ndisps); | ||
| 10467 | if (err == noErr) | ||
| 10468 | { | ||
| 10469 | displays = alloca (sizeof (CGDirectDisplayID) * ndisps); | ||
| 10470 | err = CGGetActiveDisplayList (ndisps, displays, &ndisps); | ||
| 10471 | } | ||
| 10472 | if (err == noErr) | ||
| 10473 | { | ||
| 10474 | CGRect bounds = CGRectZero; | ||
| 10475 | |||
| 10476 | while (ndisps-- > 0) | ||
| 10477 | bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps])); | ||
| 10478 | dpyinfo->height = CGRectGetHeight (bounds); | ||
| 10479 | dpyinfo->width = CGRectGetWidth (bounds); | ||
| 10480 | } | ||
| 10481 | else | ||
| 10482 | { | ||
| 10483 | dpyinfo->height = CGDisplayPixelsHigh (kCGDirectMainDisplay); | ||
| 10484 | dpyinfo->width = CGDisplayPixelsWide (kCGDirectMainDisplay); | ||
| 10485 | } | ||
| 10486 | } | ||
| 10487 | #else /* !MAC_OSX */ | ||
| 10488 | { | ||
| 10489 | GDHandle gdh = GetMainDevice (); | ||
| 10490 | Rect rect = (**gdh).gdRect; | ||
| 10491 | |||
| 10492 | dpyinfo->color_p = TestDeviceAttribute (gdh, gdDevType); | ||
| 10493 | for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1) | ||
| 10494 | if (HasDepth (gdh, dpyinfo->n_planes, gdDevType, dpyinfo->color_p)) | ||
| 10495 | break; | ||
| 10496 | |||
| 10497 | for (gdh = DMGetFirstScreenDevice (dmOnlyActiveDisplays); gdh; | ||
| 10498 | gdh = DMGetNextScreenDevice (gdh, dmOnlyActiveDisplays)) | ||
| 10499 | UnionRect (&rect, &(**gdh).gdRect, &rect); | ||
| 10500 | |||
| 10501 | dpyinfo->height = rect.bottom - rect.top; | ||
| 10502 | dpyinfo->width = rect.right - rect.left; | ||
| 10503 | } | ||
| 10504 | #endif /* !MAC_OSX */ | ||
| 10505 | } | ||
| 10506 | |||
| 10507 | |||
| 10423 | #if __profile__ | 10508 | #if __profile__ |
| 10424 | void | 10509 | void |
| 10425 | profiler_exit_proc () | 10510 | profiler_exit_proc () |
| @@ -10477,6 +10562,8 @@ main (void) | |||
| 10477 | 10562 | ||
| 10478 | init_apple_event_handler (); | 10563 | init_apple_event_handler (); |
| 10479 | 10564 | ||
| 10565 | init_dm_notification_handler (); | ||
| 10566 | |||
| 10480 | { | 10567 | { |
| 10481 | char **argv; | 10568 | char **argv; |
| 10482 | int argc = 0; | 10569 | int argc = 0; |
| @@ -10554,8 +10641,7 @@ mac_post_mouse_moved_event () | |||
| 10554 | { | 10641 | { |
| 10555 | Point mouse_pos; | 10642 | Point mouse_pos; |
| 10556 | 10643 | ||
| 10557 | GetMouse (&mouse_pos); | 10644 | GetGlobalMouse (&mouse_pos); |
| 10558 | LocalToGlobal (&mouse_pos); | ||
| 10559 | err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint, | 10645 | err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint, |
| 10560 | sizeof (Point), &mouse_pos); | 10646 | sizeof (Point), &mouse_pos); |
| 10561 | } | 10647 | } |
| @@ -11375,6 +11461,12 @@ XTread_socket (sd, expected, hold_quit) | |||
| 11375 | pending_autoraise_frame = 0; | 11461 | pending_autoraise_frame = 0; |
| 11376 | } | 11462 | } |
| 11377 | 11463 | ||
| 11464 | if (mac_screen_config_changed) | ||
| 11465 | { | ||
| 11466 | mac_get_screen_info (dpyinfo); | ||
| 11467 | mac_screen_config_changed = 0; | ||
| 11468 | } | ||
| 11469 | |||
| 11378 | #if !USE_CARBON_EVENTS | 11470 | #if !USE_CARBON_EVENTS |
| 11379 | /* Check which frames are still visible. We do this here because | 11471 | /* Check which frames are still visible. We do this here because |
| 11380 | there doesn't seem to be any direct notification from the Window | 11472 | there doesn't seem to be any direct notification from the Window |
| @@ -11509,86 +11601,7 @@ make_mac_terminal_frame (struct frame *f) | |||
| 11509 | Initialization | 11601 | Initialization |
| 11510 | ***********************************************************************/ | 11602 | ***********************************************************************/ |
| 11511 | 11603 | ||
| 11512 | int mac_initialized = 0; | 11604 | static int mac_initialized = 0; |
| 11513 | |||
| 11514 | void | ||
| 11515 | mac_initialize_display_info () | ||
| 11516 | { | ||
| 11517 | struct mac_display_info *dpyinfo = &one_mac_display_info; | ||
| 11518 | |||
| 11519 | bzero (dpyinfo, sizeof (*dpyinfo)); | ||
| 11520 | |||
| 11521 | #ifdef MAC_OSX | ||
| 11522 | dpyinfo->mac_id_name | ||
| 11523 | = (char *) xmalloc (SCHARS (Vinvocation_name) | ||
| 11524 | + SCHARS (Vsystem_name) | ||
| 11525 | + 2); | ||
| 11526 | sprintf (dpyinfo->mac_id_name, "%s@%s", | ||
| 11527 | SDATA (Vinvocation_name), SDATA (Vsystem_name)); | ||
| 11528 | #else | ||
| 11529 | dpyinfo->mac_id_name = (char *) xmalloc (strlen ("Mac Display") + 1); | ||
| 11530 | strcpy (dpyinfo->mac_id_name, "Mac Display"); | ||
| 11531 | #endif | ||
| 11532 | |||
| 11533 | dpyinfo->reference_count = 0; | ||
| 11534 | dpyinfo->resx = 72.0; | ||
| 11535 | dpyinfo->resy = 72.0; | ||
| 11536 | #ifdef MAC_OSX | ||
| 11537 | /* HasDepth returns true if it is possible to have a 32 bit display, | ||
| 11538 | but this may not be what is actually used. Mac OSX can do better. */ | ||
| 11539 | dpyinfo->color_p = CGDisplaySamplesPerPixel (kCGDirectMainDisplay) > 1; | ||
| 11540 | dpyinfo->n_planes = CGDisplayBitsPerPixel (kCGDirectMainDisplay); | ||
| 11541 | { | ||
| 11542 | CGDisplayErr err; | ||
| 11543 | CGDisplayCount ndisps; | ||
| 11544 | CGDirectDisplayID *displays; | ||
| 11545 | |||
| 11546 | err = CGGetActiveDisplayList (0, NULL, &ndisps); | ||
| 11547 | if (err == noErr) | ||
| 11548 | { | ||
| 11549 | displays = alloca (sizeof (CGDirectDisplayID) * ndisps); | ||
| 11550 | err = CGGetActiveDisplayList (ndisps, displays, &ndisps); | ||
| 11551 | } | ||
| 11552 | if (err == noErr) | ||
| 11553 | { | ||
| 11554 | CGRect bounds = CGRectMake (0, 0, 0, 0); | ||
| 11555 | |||
| 11556 | while (ndisps-- > 0) | ||
| 11557 | bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps])); | ||
| 11558 | dpyinfo->height = CGRectGetHeight (bounds); | ||
| 11559 | dpyinfo->width = CGRectGetWidth (bounds); | ||
| 11560 | } | ||
| 11561 | else | ||
| 11562 | { | ||
| 11563 | dpyinfo->height = CGDisplayPixelsHigh (kCGDirectMainDisplay); | ||
| 11564 | dpyinfo->width = CGDisplayPixelsWide (kCGDirectMainDisplay); | ||
| 11565 | } | ||
| 11566 | } | ||
| 11567 | #else | ||
| 11568 | { | ||
| 11569 | GDHandle main_device_handle = LMGetMainDevice(); | ||
| 11570 | |||
| 11571 | dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType); | ||
| 11572 | for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1) | ||
| 11573 | if (HasDepth (main_device_handle, dpyinfo->n_planes, | ||
| 11574 | gdDevType, dpyinfo->color_p)) | ||
| 11575 | break; | ||
| 11576 | dpyinfo->height = (**main_device_handle).gdRect.bottom; | ||
| 11577 | dpyinfo->width = (**main_device_handle).gdRect.right; | ||
| 11578 | } | ||
| 11579 | #endif | ||
| 11580 | dpyinfo->grabbed = 0; | ||
| 11581 | dpyinfo->root_window = NULL; | ||
| 11582 | dpyinfo->image_cache = make_image_cache (); | ||
| 11583 | |||
| 11584 | dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; | ||
| 11585 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; | ||
| 11586 | dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID; | ||
| 11587 | dpyinfo->mouse_face_window = Qnil; | ||
| 11588 | dpyinfo->mouse_face_overlay = Qnil; | ||
| 11589 | dpyinfo->mouse_face_hidden = 0; | ||
| 11590 | } | ||
| 11591 | |||
| 11592 | 11605 | ||
| 11593 | static XrmDatabase | 11606 | static XrmDatabase |
| 11594 | mac_make_rdb (xrm_option) | 11607 | mac_make_rdb (xrm_option) |
| @@ -11622,9 +11635,37 @@ mac_term_init (display_name, xrm_option, resource_name) | |||
| 11622 | if (x_display_list) | 11635 | if (x_display_list) |
| 11623 | error ("Sorry, this version can only handle one display"); | 11636 | error ("Sorry, this version can only handle one display"); |
| 11624 | 11637 | ||
| 11625 | mac_initialize_display_info (); | ||
| 11626 | |||
| 11627 | dpyinfo = &one_mac_display_info; | 11638 | dpyinfo = &one_mac_display_info; |
| 11639 | bzero (dpyinfo, sizeof (*dpyinfo)); | ||
| 11640 | |||
| 11641 | #ifdef MAC_OSX | ||
| 11642 | dpyinfo->mac_id_name | ||
| 11643 | = (char *) xmalloc (SCHARS (Vinvocation_name) | ||
| 11644 | + SCHARS (Vsystem_name) | ||
| 11645 | + 2); | ||
| 11646 | sprintf (dpyinfo->mac_id_name, "%s@%s", | ||
| 11647 | SDATA (Vinvocation_name), SDATA (Vsystem_name)); | ||
| 11648 | #else | ||
| 11649 | dpyinfo->mac_id_name = (char *) xmalloc (strlen ("Mac Display") + 1); | ||
| 11650 | strcpy (dpyinfo->mac_id_name, "Mac Display"); | ||
| 11651 | #endif | ||
| 11652 | |||
| 11653 | dpyinfo->reference_count = 0; | ||
| 11654 | dpyinfo->resx = 72.0; | ||
| 11655 | dpyinfo->resy = 72.0; | ||
| 11656 | |||
| 11657 | mac_get_screen_info (dpyinfo); | ||
| 11658 | |||
| 11659 | dpyinfo->grabbed = 0; | ||
| 11660 | dpyinfo->root_window = NULL; | ||
| 11661 | dpyinfo->image_cache = make_image_cache (); | ||
| 11662 | |||
| 11663 | dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; | ||
| 11664 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; | ||
| 11665 | dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID; | ||
| 11666 | dpyinfo->mouse_face_window = Qnil; | ||
| 11667 | dpyinfo->mouse_face_overlay = Qnil; | ||
| 11668 | dpyinfo->mouse_face_hidden = 0; | ||
| 11628 | 11669 | ||
| 11629 | dpyinfo->xrdb = mac_make_rdb (xrm_option); | 11670 | dpyinfo->xrdb = mac_make_rdb (xrm_option); |
| 11630 | 11671 | ||
| @@ -11642,6 +11683,7 @@ mac_term_init (display_name, xrm_option, resource_name) | |||
| 11642 | 11683 | ||
| 11643 | return dpyinfo; | 11684 | return dpyinfo; |
| 11644 | } | 11685 | } |
| 11686 | |||
| 11645 | /* Get rid of display DPYINFO, assuming all frames are already gone. */ | 11687 | /* Get rid of display DPYINFO, assuming all frames are already gone. */ |
| 11646 | 11688 | ||
| 11647 | void | 11689 | void |
| @@ -11861,6 +11903,8 @@ mac_initialize () | |||
| 11861 | 11903 | ||
| 11862 | init_apple_event_handler (); | 11904 | init_apple_event_handler (); |
| 11863 | 11905 | ||
| 11906 | init_dm_notification_handler (); | ||
| 11907 | |||
| 11864 | if (!inhibit_window_system) | 11908 | if (!inhibit_window_system) |
| 11865 | { | 11909 | { |
| 11866 | static const ProcessSerialNumber psn = {0, kCurrentProcess}; | 11910 | static const ProcessSerialNumber psn = {0, kCurrentProcess}; |
diff --git a/src/minibuf.c b/src/minibuf.c index 50f48c2344f..6c6fa7451fc 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -386,7 +386,7 @@ Return (point-min) if current buffer is not a minibuffer. */) | |||
| 386 | DEFUN ("minibuffer-contents", Fminibuffer_contents, | 386 | DEFUN ("minibuffer-contents", Fminibuffer_contents, |
| 387 | Sminibuffer_contents, 0, 0, 0, | 387 | Sminibuffer_contents, 0, 0, 0, |
| 388 | doc: /* Return the user input in a minibuffer as a string. | 388 | doc: /* Return the user input in a minibuffer as a string. |
| 389 | The current buffer must be a minibuffer. */) | 389 | If the current buffer is not a minibuffer, return its entire contents. */) |
| 390 | () | 390 | () |
| 391 | { | 391 | { |
| 392 | int prompt_end = XINT (Fminibuffer_prompt_end ()); | 392 | int prompt_end = XINT (Fminibuffer_prompt_end ()); |
| @@ -396,7 +396,7 @@ The current buffer must be a minibuffer. */) | |||
| 396 | DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties, | 396 | DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties, |
| 397 | Sminibuffer_contents_no_properties, 0, 0, 0, | 397 | Sminibuffer_contents_no_properties, 0, 0, 0, |
| 398 | doc: /* Return the user input in a minibuffer as a string, without text-properties. | 398 | doc: /* Return the user input in a minibuffer as a string, without text-properties. |
| 399 | The current buffer must be a minibuffer. */) | 399 | If the current buffer is not a minibuffer, return its entire contents. */) |
| 400 | () | 400 | () |
| 401 | { | 401 | { |
| 402 | int prompt_end = XINT (Fminibuffer_prompt_end ()); | 402 | int prompt_end = XINT (Fminibuffer_prompt_end ()); |
| @@ -407,7 +407,7 @@ DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents, | |||
| 407 | Sminibuffer_completion_contents, 0, 0, 0, | 407 | Sminibuffer_completion_contents, 0, 0, 0, |
| 408 | doc: /* Return the user input in a minibuffer before point as a string. | 408 | doc: /* Return the user input in a minibuffer before point as a string. |
| 409 | That is what completion commands operate on. | 409 | That is what completion commands operate on. |
| 410 | The current buffer must be a minibuffer. */) | 410 | If the current buffer is not a minibuffer, return its entire contents. */) |
| 411 | () | 411 | () |
| 412 | { | 412 | { |
| 413 | int prompt_end = XINT (Fminibuffer_prompt_end ()); | 413 | int prompt_end = XINT (Fminibuffer_prompt_end ()); |
| @@ -419,7 +419,7 @@ The current buffer must be a minibuffer. */) | |||
| 419 | DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, | 419 | DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, |
| 420 | Sdelete_minibuffer_contents, 0, 0, 0, | 420 | Sdelete_minibuffer_contents, 0, 0, 0, |
| 421 | doc: /* Delete all user input in a minibuffer. | 421 | doc: /* Delete all user input in a minibuffer. |
| 422 | The current buffer must be a minibuffer. */) | 422 | If the current buffer is not a minibuffer, erase its entire contents. */) |
| 423 | () | 423 | () |
| 424 | { | 424 | { |
| 425 | int prompt_end = XINT (Fminibuffer_prompt_end ()); | 425 | int prompt_end = XINT (Fminibuffer_prompt_end ()); |
| @@ -704,7 +704,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 704 | if (!NILP (current_buffer->enable_multibyte_characters) | 704 | if (!NILP (current_buffer->enable_multibyte_characters) |
| 705 | && ! STRING_MULTIBYTE (minibuf_prompt)) | 705 | && ! STRING_MULTIBYTE (minibuf_prompt)) |
| 706 | minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); | 706 | minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); |
| 707 | 707 | ||
| 708 | /* Insert the prompt, record where it ends. */ | 708 | /* Insert the prompt, record where it ends. */ |
| 709 | Finsert (1, &minibuf_prompt); | 709 | Finsert (1, &minibuf_prompt); |
| 710 | if (PT > BEG) | 710 | if (PT > BEG) |
diff --git a/src/process.c b/src/process.c index 2e41267479c..567aae7c08f 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1557,13 +1557,19 @@ DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0, | |||
| 1557 | doc: /* Start a program in a subprocess. Return the process object for it. | 1557 | doc: /* Start a program in a subprocess. Return the process object for it. |
| 1558 | NAME is name for process. It is modified if necessary to make it unique. | 1558 | NAME is name for process. It is modified if necessary to make it unique. |
| 1559 | BUFFER is the buffer (or buffer name) to associate with the process. | 1559 | BUFFER is the buffer (or buffer name) to associate with the process. |
| 1560 | Process output goes at end of that buffer, unless you specify | 1560 | |
| 1561 | an output stream or filter function to handle the output. | 1561 | Process output (both standard output and standard error streams) goes |
| 1562 | BUFFER may be also nil, meaning that this process is not associated | 1562 | at end of BUFFER, unless you specify an output stream or filter |
| 1563 | with any buffer. | 1563 | function to handle the output. BUFFER may also be nil, meaning that |
| 1564 | this process is not associated with any buffer. | ||
| 1565 | |||
| 1564 | PROGRAM is the program file name. It is searched for in PATH. | 1566 | PROGRAM is the program file name. It is searched for in PATH. |
| 1565 | Remaining arguments are strings to give program as arguments. | 1567 | Remaining arguments are strings to give program as arguments. |
| 1566 | 1568 | ||
| 1569 | If you want to separate standard output from standard error, invoke | ||
| 1570 | the command through a shell and redirect one of them using the shell | ||
| 1571 | syntax. | ||
| 1572 | |||
| 1567 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | 1573 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) |
| 1568 | (nargs, args) | 1574 | (nargs, args) |
| 1569 | int nargs; | 1575 | int nargs; |
diff --git a/src/sysdep.c b/src/sysdep.c index 20d60400dcb..27e90349cb6 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -2433,7 +2433,9 @@ init_system_name () | |||
| 2433 | /* We still don't have a fully qualified domain name. | 2433 | /* We still don't have a fully qualified domain name. |
| 2434 | Try to find one in the list of alternate names */ | 2434 | Try to find one in the list of alternate names */ |
| 2435 | char **alias = hp->h_aliases; | 2435 | char **alias = hp->h_aliases; |
| 2436 | while (*alias && !index (*alias, '.')) | 2436 | while (*alias |
| 2437 | && (!index (*alias, '.') | ||
| 2438 | || !strcmp (*alias, "localhost.localdomain"))) | ||
| 2437 | alias++; | 2439 | alias++; |
| 2438 | if (*alias) | 2440 | if (*alias) |
| 2439 | fqdn = *alias; | 2441 | fqdn = *alias; |
diff --git a/src/xdisp.c b/src/xdisp.c index 5c273540c41..eb97ef110a9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12926,6 +12926,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12926 | int rc; | 12926 | int rc; |
| 12927 | int centering_position = -1; | 12927 | int centering_position = -1; |
| 12928 | int last_line_misfit = 0; | 12928 | int last_line_misfit = 0; |
| 12929 | int save_beg_unchanged, save_end_unchanged; | ||
| 12929 | 12930 | ||
| 12930 | SET_TEXT_POS (lpoint, PT, PT_BYTE); | 12931 | SET_TEXT_POS (lpoint, PT, PT_BYTE); |
| 12931 | opoint = lpoint; | 12932 | opoint = lpoint; |
| @@ -12990,6 +12991,9 @@ redisplay_window (window, just_this_one_p) | |||
| 12990 | set_buffer_internal_1 (XBUFFER (w->buffer)); | 12991 | set_buffer_internal_1 (XBUFFER (w->buffer)); |
| 12991 | SET_TEXT_POS (opoint, PT, PT_BYTE); | 12992 | SET_TEXT_POS (opoint, PT, PT_BYTE); |
| 12992 | 12993 | ||
| 12994 | save_beg_unchanged = BEG_UNCHANGED; | ||
| 12995 | save_end_unchanged = END_UNCHANGED; | ||
| 12996 | |||
| 12993 | current_matrix_up_to_date_p | 12997 | current_matrix_up_to_date_p |
| 12994 | = (!NILP (w->window_end_valid) | 12998 | = (!NILP (w->window_end_valid) |
| 12995 | && !current_buffer->clip_changed | 12999 | && !current_buffer->clip_changed |
| @@ -13294,11 +13298,20 @@ redisplay_window (window, just_this_one_p) | |||
| 13294 | && NILP (do_mouse_tracking) | 13298 | && NILP (do_mouse_tracking) |
| 13295 | && CHARPOS (startp) > BEGV) | 13299 | && CHARPOS (startp) > BEGV) |
| 13296 | { | 13300 | { |
| 13297 | /* Make sure beg_unchanged and end_unchanged are up to date. | 13301 | #if 0 |
| 13298 | Do it only if buffer has really changed. This may or may | 13302 | /* The following code tried to make BEG_UNCHANGED and |
| 13299 | not have been done by try_window_id (see which) already. */ | 13303 | END_UNCHANGED up to date (similar to try_window_id). |
| 13304 | Is it important to do so? | ||
| 13305 | |||
| 13306 | The trouble is that it's a little too strict when it | ||
| 13307 | comes to overlays: modify_overlay can call | ||
| 13308 | BUF_COMPUTE_UNCHANGED, which alters BUF_BEG_UNCHANGED and | ||
| 13309 | BUF_END_UNCHANGED directly without moving the gap. | ||
| 13310 | |||
| 13311 | This can result in spurious recentering when overlays are | ||
| 13312 | altered in the buffer. So unless it's proven necessary, | ||
| 13313 | let's leave this commented out for now. -- cyd. */ | ||
| 13300 | if (MODIFF > SAVE_MODIFF | 13314 | if (MODIFF > SAVE_MODIFF |
| 13301 | /* This seems to happen sometimes after saving a buffer. */ | ||
| 13302 | || BEG_UNCHANGED + END_UNCHANGED > Z_BYTE) | 13315 | || BEG_UNCHANGED + END_UNCHANGED > Z_BYTE) |
| 13303 | { | 13316 | { |
| 13304 | if (GPT - BEG < BEG_UNCHANGED) | 13317 | if (GPT - BEG < BEG_UNCHANGED) |
| @@ -13306,9 +13319,10 @@ redisplay_window (window, just_this_one_p) | |||
| 13306 | if (Z - GPT < END_UNCHANGED) | 13319 | if (Z - GPT < END_UNCHANGED) |
| 13307 | END_UNCHANGED = Z - GPT; | 13320 | END_UNCHANGED = Z - GPT; |
| 13308 | } | 13321 | } |
| 13322 | #endif | ||
| 13309 | 13323 | ||
| 13310 | if (CHARPOS (startp) > BEG + BEG_UNCHANGED | 13324 | if (CHARPOS (startp) > BEG + save_beg_unchanged |
| 13311 | && CHARPOS (startp) <= Z - END_UNCHANGED) | 13325 | && CHARPOS (startp) <= Z - save_end_unchanged) |
| 13312 | { | 13326 | { |
| 13313 | /* There doesn't seems to be a simple way to find a new | 13327 | /* There doesn't seems to be a simple way to find a new |
| 13314 | window start that is near the old window start, so | 13328 | window start that is near the old window start, so |
| @@ -16002,13 +16016,37 @@ cursor_row_p (w, row) | |||
| 16002 | 16016 | ||
| 16003 | if (PT == MATRIX_ROW_END_CHARPOS (row)) | 16017 | if (PT == MATRIX_ROW_END_CHARPOS (row)) |
| 16004 | { | 16018 | { |
| 16005 | /* If the row ends with a newline from a string, we don't want | 16019 | /* Suppose the row ends on a string. |
| 16006 | the cursor there, but we still want it at the start of the | 16020 | Unless the row is continued, that means it ends on a newline |
| 16007 | string if the string starts in this row. | 16021 | in the string. If it's anything other than a display string |
| 16008 | If the row is continued it doesn't end in a newline. */ | 16022 | (e.g. a before-string from an overlay), we don't want the |
| 16023 | cursor there. (This heuristic seems to give the optimal | ||
| 16024 | behavior for the various types of multi-line strings.) */ | ||
| 16009 | if (CHARPOS (row->end.string_pos) >= 0) | 16025 | if (CHARPOS (row->end.string_pos) >= 0) |
| 16010 | cursor_row_p = (row->continued_p | 16026 | { |
| 16011 | || PT >= MATRIX_ROW_START_CHARPOS (row)); | 16027 | if (row->continued_p) |
| 16028 | cursor_row_p = 1; | ||
| 16029 | else | ||
| 16030 | { | ||
| 16031 | /* Check for `display' property. */ | ||
| 16032 | struct glyph *beg = row->glyphs[TEXT_AREA]; | ||
| 16033 | struct glyph *end = beg + row->used[TEXT_AREA] - 1; | ||
| 16034 | struct glyph *glyph; | ||
| 16035 | |||
| 16036 | cursor_row_p = 0; | ||
| 16037 | for (glyph = end; glyph >= beg; --glyph) | ||
| 16038 | if (STRINGP (glyph->object)) | ||
| 16039 | { | ||
| 16040 | Lisp_Object prop | ||
| 16041 | = Fget_char_property (make_number (PT), | ||
| 16042 | Qdisplay, Qnil); | ||
| 16043 | cursor_row_p = | ||
| 16044 | (!NILP (prop) | ||
| 16045 | && display_prop_string_p (prop, glyph->object)); | ||
| 16046 | break; | ||
| 16047 | } | ||
| 16048 | } | ||
| 16049 | } | ||
| 16012 | else if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)) | 16050 | else if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)) |
| 16013 | { | 16051 | { |
| 16014 | /* If the row ends in middle of a real character, | 16052 | /* If the row ends in middle of a real character, |