aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2006-02-11 00:11:19 +0000
committerMiles Bader2006-02-11 00:11:19 +0000
commit0b125475295ac24db12b28e67d349a0ec0020bd3 (patch)
tree100578c3b6eb01151eb5c51f0bbe11ca941bd0d5 /src
parent380874900ca183ec2fdce91949d841328852d7a8 (diff)
parent9d64cd1339707277e541b6c54f847240464f65ec (diff)
downloademacs-0b125475295ac24db12b28e67d349a0ec0020bd3.tar.gz
emacs-0b125475295ac24db12b28e67d349a0ec0020bd3.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-14
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 58-65) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 22-28) - Update from CVS - Merge from emacs--devo--0 - Update from CVS: lisp/gnus.el: Remove bogus comment.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog53
-rw-r--r--src/alloc.c4
-rw-r--r--src/data.c17
-rw-r--r--src/doc.c2
-rw-r--r--src/eval.c10
-rw-r--r--src/keyboard.c2
-rw-r--r--src/keymap.c21
-rw-r--r--src/lisp.h2
-rw-r--r--src/macfns.c77
-rw-r--r--src/macterm.c26
-rw-r--r--src/window.c8
-rw-r--r--src/xterm.c11
12 files changed, 171 insertions, 62 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 73436b217a1..0f1dded77c7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,58 @@
12006-02-10 Thien-Thi Nguyen <ttn@gnu.org>
2
3 * data.c (Findirect_function): Rewrite docstring.
4 Fix omission bug: Declare new arg NOERROR.
5
62006-02-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7
8 * macfns.c (x_set_mouse_color): Don't call rif->define_frame_cursor
9 if window_desc is not set yet.
10 (Fx_create_frame): Remove variable x_frame_name. Apply 2005-12-07
11 and 2006-01-26 changes for xfns.c. Call x_iconify_frame if frame
12 parameter `visibility' is `icon'.
13 (Fx_create_frame, x_create_tip_frame): Use "fontset-standard"
14 instead of "fontset-mac".
15 (Fx_focus_frame): New defun.
16 (syms_of_macfns): Defsubr it.
17
18 * macterm.c (mac_define_frame_cursor): Don't change pointer shape
19 for unfocused frame.
20 (x_raise_frame): Call BringToFront instead of SelectWindow.
21 (x_lower_frame): Use NULL instead of nil.
22 (x_make_frame_visible): Don't call SelectWindow.
23 (XTread_socket): Increment handling_signal at the start, decrement
24 it at the end.
25 [USE_CG_TEXT_DRAWING] (init_cg_text_anti_aliasing_threshold): Use
26 CFPreferencesGetAppIntegerValue instead of Fmac_get_preference.
27
282006-02-10 Kim F. Storm <storm@cua.dk>
29
30 * data.c (Findirect_function): Add NOERROR arg. All callers changed
31 to pass Qnil for NOERROR.
32
33 * keymap.c (current_minor_maps_error): Remove.
34 (current_minor_maps): Pass Qt for NOERROR to Findirect_function
35 instead of using internal_condition_case_1+current_minor_maps_error.
36
372006-02-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
38
39 * xterm.c (handle_one_xevent): Must note mouse movement even for nil
40 frames for GTK, in that case it is the tool bar. This is so that
41 highlighted text get reset properly.
42
432006-02-09 Juanma Barranquero <lekktu@gmail.com>
44
45 * alloc.c (Fmake_bool_vector, Fpurecopy): Doc fixes.
46
472006-02-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
48
49 * window.c (adjust_window_trailing_edge): Check that shrinking
50 does not set a window to size zero or less.
51
12006-02-08 Miles Bader <miles@gnu.org> 522006-02-08 Miles Bader <miles@gnu.org>
2 53
3 * editfns.c (Fconstrain_to_field): Use Fget_char_property instead 54 * editfns.c (Fconstrain_to_field): Use Fget_char_property instead
4 of Fget_text_property (other field functions word with overlays as 55 of Fget_text_property (other field functions work with overlays as
5 well as text-properties). 56 well as text-properties).
6 57
72006-02-07 Kenichi Handa <handa@m17n.org> 582006-02-07 Kenichi Handa <handa@m17n.org>
diff --git a/src/alloc.c b/src/alloc.c
index 3d87710c772..04efb708665 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2299,7 +2299,7 @@ INIT must be an integer that represents a character. */)
2299 2299
2300 2300
2301DEFUN ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0, 2301DEFUN ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0,
2302 doc: /* Return a new bool-vector of length LENGTH, using INIT for as each element. 2302 doc: /* Return a new bool-vector of length LENGTH, using INIT for each element.
2303LENGTH must be a number. INIT matters only in whether it is t or nil. */) 2303LENGTH must be a number. INIT matters only in whether it is t or nil. */)
2304 (length, init) 2304 (length, init)
2305 Lisp_Object length, init; 2305 Lisp_Object length, init;
@@ -4768,7 +4768,7 @@ make_pure_vector (len)
4768 4768
4769 4769
4770DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0, 4770DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0,
4771 doc: /* Make a copy of OBJECT in pure storage. 4771 doc: /* Make a copy of object OBJ in pure storage.
4772Recursively copies contents of vectors and cons cells. 4772Recursively copies contents of vectors and cons cells.
4773Does not copy symbols. Copies strings without text properties. */) 4773Does not copy symbols. Copies strings without text properties. */)
4774 (obj) 4774 (obj)
diff --git a/src/data.c b/src/data.c
index fbfbb141d48..a4d865f681e 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1927,23 +1927,26 @@ indirect_function (object)
1927 return hare; 1927 return hare;
1928} 1928}
1929 1929
1930DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 1, 0, 1930DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0,
1931 doc: /* Return the function at the end of OBJECT's function chain. 1931 doc: /* Return the function at the end of OBJECT's function chain.
1932If OBJECT is a symbol, follow all function indirections and return the final 1932If OBJECT is not a symbol, just return it. Otherwise, follow all
1933function binding. 1933function indirections to find the final function binding and return it.
1934If OBJECT is not a symbol, just return it. 1934If the final symbol in the chain is unbound, signal a void-function error.
1935Signal a void-function error if the final symbol is unbound. 1935Optional arg NOERROR non-nil means to return nil instead of signalling.
1936Signal a cyclic-function-indirection error if there is a loop in the 1936Signal a cyclic-function-indirection error if there is a loop in the
1937function chain of symbols. */) 1937function chain of symbols. */)
1938 (object) 1938 (object, noerror)
1939 register Lisp_Object object; 1939 register Lisp_Object object;
1940 Lisp_Object noerror;
1940{ 1941{
1941 Lisp_Object result; 1942 Lisp_Object result;
1942 1943
1943 result = indirect_function (object); 1944 result = indirect_function (object);
1944 1945
1945 if (EQ (result, Qunbound)) 1946 if (EQ (result, Qunbound))
1946 return Fsignal (Qvoid_function, Fcons (object, Qnil)); 1947 return (NILP (noerror)
1948 ? Fsignal (Qvoid_function, Fcons (object, Qnil))
1949 : Qnil);
1947 return result; 1950 return result;
1948} 1951}
1949 1952
diff --git a/src/doc.c b/src/doc.c
index 32c74b71eeb..19c03a7a71d 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -386,7 +386,7 @@ string is passed through `substitute-command-keys'. */)
386 !NILP (tem))) 386 !NILP (tem)))
387 return Fdocumentation_property (function, Qfunction_documentation, raw); 387 return Fdocumentation_property (function, Qfunction_documentation, raw);
388 388
389 fun = Findirect_function (function); 389 fun = Findirect_function (function, Qnil);
390 if (SUBRP (fun)) 390 if (SUBRP (fun))
391 { 391 {
392 if (XSUBR (fun)->doc == 0) 392 if (XSUBR (fun)->doc == 0)
diff --git a/src/eval.c b/src/eval.c
index 2f89e515f8d..eff284820f0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -618,7 +618,7 @@ interactive_p (exclude_subrs_p)
618 618
619 /* If this isn't a byte-compiled function, there may be a frame at 619 /* If this isn't a byte-compiled function, there may be a frame at
620 the top for Finteractive_p. If so, skip it. */ 620 the top for Finteractive_p. If so, skip it. */
621 fun = Findirect_function (*btp->function); 621 fun = Findirect_function (*btp->function, Qnil);
622 if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p 622 if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p
623 || XSUBR (fun) == &Scalled_interactively_p)) 623 || XSUBR (fun) == &Scalled_interactively_p))
624 btp = btp->next; 624 btp = btp->next;
@@ -639,7 +639,7 @@ interactive_p (exclude_subrs_p)
639 a special form, ignoring frames for Finteractive_p and/or 639 a special form, ignoring frames for Finteractive_p and/or
640 Fbytecode at the top. If this frame is for a built-in function 640 Fbytecode at the top. If this frame is for a built-in function
641 (such as load or eval-region) return nil. */ 641 (such as load or eval-region) return nil. */
642 fun = Findirect_function (*btp->function); 642 fun = Findirect_function (*btp->function, Qnil);
643 if (exclude_subrs_p && SUBRP (fun)) 643 if (exclude_subrs_p && SUBRP (fun))
644 return 0; 644 return 0;
645 645
@@ -2079,7 +2079,7 @@ do_autoload (fundef, funname)
2079 Vautoload_queue = Qt; 2079 Vautoload_queue = Qt;
2080 unbind_to (count, Qnil); 2080 unbind_to (count, Qnil);
2081 2081
2082 fun = Findirect_function (fun); 2082 fun = Findirect_function (fun, Qnil);
2083 2083
2084 if (!NILP (Fequal (fun, fundef))) 2084 if (!NILP (Fequal (fun, fundef)))
2085 error ("Autoloading failed to define function %s", 2085 error ("Autoloading failed to define function %s",
@@ -2142,7 +2142,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2142 /* At this point, only original_fun and original_args 2142 /* At this point, only original_fun and original_args
2143 have values that will be used below */ 2143 have values that will be used below */
2144 retry: 2144 retry:
2145 fun = Findirect_function (original_fun); 2145 fun = Findirect_function (original_fun, Qnil);
2146 2146
2147 if (SUBRP (fun)) 2147 if (SUBRP (fun))
2148 { 2148 {
@@ -2841,7 +2841,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2841 2841
2842 fun = args[0]; 2842 fun = args[0];
2843 2843
2844 fun = Findirect_function (fun); 2844 fun = Findirect_function (fun, Qnil);
2845 2845
2846 if (SUBRP (fun)) 2846 if (SUBRP (fun))
2847 { 2847 {
diff --git a/src/keyboard.c b/src/keyboard.c
index f50b456feb4..2081db6ae9d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9698,7 +9698,7 @@ a special event, so ignore the prefix argument and don't clear it. */)
9698 9698
9699 while (1) 9699 while (1)
9700 { 9700 {
9701 final = Findirect_function (cmd); 9701 final = Findirect_function (cmd, Qnil);
9702 9702
9703 if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload))) 9703 if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload)))
9704 { 9704 {
diff --git a/src/keymap.c b/src/keymap.c
index 01c637132eb..22b495033ef 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -69,7 +69,7 @@ Lisp_Object Vminibuffer_local_completion_map;
69/* keymap used for minibuffers when doing completion in filenames */ 69/* keymap used for minibuffers when doing completion in filenames */
70Lisp_Object Vminibuffer_local_filename_completion_map; 70Lisp_Object Vminibuffer_local_filename_completion_map;
71 71
72/* keymap used for minibuffers when doing completion in filenames 72/* keymap used for minibuffers when doing completion in filenames
73 with require-match*/ 73 with require-match*/
74Lisp_Object Vminibuffer_local_must_match_filename_map; 74Lisp_Object Vminibuffer_local_must_match_filename_map;
75 75
@@ -1403,13 +1403,6 @@ silly_event_symbol_error (c)
1403static Lisp_Object *cmm_modes = NULL, *cmm_maps = NULL; 1403static Lisp_Object *cmm_modes = NULL, *cmm_maps = NULL;
1404static int cmm_size = 0; 1404static int cmm_size = 0;
1405 1405
1406/* Error handler used in current_minor_maps. */
1407static Lisp_Object
1408current_minor_maps_error ()
1409{
1410 return Qnil;
1411}
1412
1413/* Store a pointer to an array of the keymaps of the currently active 1406/* Store a pointer to an array of the keymaps of the currently active
1414 minor modes in *buf, and return the number of maps it contains. 1407 minor modes in *buf, and return the number of maps it contains.
1415 1408
@@ -1511,9 +1504,7 @@ current_minor_maps (modeptr, mapptr)
1511 } 1504 }
1512 1505
1513 /* Get the keymap definition--or nil if it is not defined. */ 1506 /* Get the keymap definition--or nil if it is not defined. */
1514 temp = internal_condition_case_1 (Findirect_function, 1507 temp = Findirect_function (XCDR (assoc), Qt);
1515 XCDR (assoc),
1516 Qerror, current_minor_maps_error);
1517 if (!NILP (temp)) 1508 if (!NILP (temp))
1518 { 1509 {
1519 cmm_modes[i] = var; 1510 cmm_modes[i] = var;
@@ -3753,11 +3744,11 @@ don't alter it yourself. */);
3753 Vminibuffer_local_completion_map = Fmake_sparse_keymap (Qnil); 3744 Vminibuffer_local_completion_map = Fmake_sparse_keymap (Qnil);
3754 Fset_keymap_parent (Vminibuffer_local_completion_map, Vminibuffer_local_map); 3745 Fset_keymap_parent (Vminibuffer_local_completion_map, Vminibuffer_local_map);
3755 3746
3756 DEFVAR_LISP ("minibuffer-local-filename-completion-map", 3747 DEFVAR_LISP ("minibuffer-local-filename-completion-map",
3757 &Vminibuffer_local_filename_completion_map, 3748 &Vminibuffer_local_filename_completion_map,
3758 doc: /* Local keymap for minibuffer input with completion for filenames. */); 3749 doc: /* Local keymap for minibuffer input with completion for filenames. */);
3759 Vminibuffer_local_filename_completion_map = Fmake_sparse_keymap (Qnil); 3750 Vminibuffer_local_filename_completion_map = Fmake_sparse_keymap (Qnil);
3760 Fset_keymap_parent (Vminibuffer_local_filename_completion_map, 3751 Fset_keymap_parent (Vminibuffer_local_filename_completion_map,
3761 Vminibuffer_local_completion_map); 3752 Vminibuffer_local_completion_map);
3762 3753
3763 3754
@@ -3767,11 +3758,11 @@ don't alter it yourself. */);
3767 Fset_keymap_parent (Vminibuffer_local_must_match_map, 3758 Fset_keymap_parent (Vminibuffer_local_must_match_map,
3768 Vminibuffer_local_completion_map); 3759 Vminibuffer_local_completion_map);
3769 3760
3770 DEFVAR_LISP ("minibuffer-local-must-match-filename-map", 3761 DEFVAR_LISP ("minibuffer-local-must-match-filename-map",
3771 &Vminibuffer_local_must_match_filename_map, 3762 &Vminibuffer_local_must_match_filename_map,
3772 doc: /* Local keymap for minibuffer input with completion for filenames with exact match. */); 3763 doc: /* Local keymap for minibuffer input with completion for filenames with exact match. */);
3773 Vminibuffer_local_must_match_filename_map = Fmake_sparse_keymap (Qnil); 3764 Vminibuffer_local_must_match_filename_map = Fmake_sparse_keymap (Qnil);
3774 Fset_keymap_parent (Vminibuffer_local_must_match_filename_map, 3765 Fset_keymap_parent (Vminibuffer_local_must_match_filename_map,
3775 Vminibuffer_local_must_match_map); 3766 Vminibuffer_local_must_match_map);
3776 3767
3777 DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, 3768 DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist,
diff --git a/src/lisp.h b/src/lisp.h
index 60bf01ab5a1..9cec643a078 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2189,7 +2189,7 @@ EXFUN (Fsymbol_function, 1);
2189EXFUN (Fsymbol_plist, 1); 2189EXFUN (Fsymbol_plist, 1);
2190EXFUN (Fsymbol_name, 1); 2190EXFUN (Fsymbol_name, 1);
2191extern Lisp_Object indirect_function P_ ((Lisp_Object)); 2191extern Lisp_Object indirect_function P_ ((Lisp_Object));
2192EXFUN (Findirect_function, 1); 2192EXFUN (Findirect_function, 2);
2193EXFUN (Ffset, 2); 2193EXFUN (Ffset, 2);
2194EXFUN (Fsetplist, 2); 2194EXFUN (Fsetplist, 2);
2195EXFUN (Fsymbol_value, 1); 2195EXFUN (Fsymbol_value, 1);
diff --git a/src/macfns.c b/src/macfns.c
index ae7f1d87be4..3f59a459010 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1448,7 +1448,8 @@ x_set_mouse_color (f, arg, oldval)
1448 1448
1449 BLOCK_INPUT; 1449 BLOCK_INPUT;
1450 1450
1451 rif->define_frame_cursor (f, cursor); 1451 if (FRAME_MAC_WINDOW (f) != 0)
1452 rif->define_frame_cursor (f, cursor);
1452 1453
1453 f->output_data.mac->text_cursor = cursor; 1454 f->output_data.mac->text_cursor = cursor;
1454 f->output_data.mac->nontext_cursor = nontext_cursor; 1455 f->output_data.mac->nontext_cursor = nontext_cursor;
@@ -2398,11 +2399,12 @@ This function is an internal primitive--use `make-frame' instead. */)
2398 struct mac_display_info *dpyinfo = NULL; 2399 struct mac_display_info *dpyinfo = NULL;
2399 Lisp_Object parent; 2400 Lisp_Object parent;
2400 struct kboard *kb; 2401 struct kboard *kb;
2401 char x_frame_name[10];
2402 static int x_frame_count = 2; /* begins at 2 because terminal frame is F1 */ 2402 static int x_frame_count = 2; /* begins at 2 because terminal frame is F1 */
2403 2403
2404 check_mac (); 2404 check_mac ();
2405 2405
2406 parms = Fcopy_alist (parms);
2407
2406 /* Use this general default value to start with 2408 /* Use this general default value to start with
2407 until we know if this frame has a specified name. */ 2409 until we know if this frame has a specified name. */
2408 Vx_resource_name = Vinvocation_name; 2410 Vx_resource_name = Vinvocation_name;
@@ -2452,18 +2454,6 @@ This function is an internal primitive--use `make-frame' instead. */)
2452 else 2454 else
2453 f = make_frame (1); 2455 f = make_frame (1);
2454 2456
2455 if (EQ (name, Qunbound) || NILP (name))
2456 {
2457 sprintf (x_frame_name, "F%d", x_frame_count++);
2458 f->name = build_string (x_frame_name);
2459 f->explicit_name = 0;
2460 }
2461 else
2462 {
2463 f->name = name;
2464 f->explicit_name = 1;
2465 }
2466
2467 XSETFRAME (frame, f); 2457 XSETFRAME (frame, f);
2468 2458
2469 /* Note that X Windows does support scroll bars. */ 2459 /* Note that X Windows does support scroll bars. */
@@ -2544,7 +2534,7 @@ This function is an internal primitive--use `make-frame' instead. */)
2544 font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1"); 2534 font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1");
2545 /* If those didn't work, look for something which will at least work. */ 2535 /* If those didn't work, look for something which will at least work. */
2546 if (! STRINGP (font)) 2536 if (! STRINGP (font))
2547 font = x_new_fontset (f, build_string ("fontset-mac")); 2537 font = x_new_fontset (f, build_string ("fontset-standard"));
2548 if (! STRINGP (font)) 2538 if (! STRINGP (font))
2549 font = x_new_font (f, "-*-monaco-*-12-*-mac-roman"); 2539 font = x_new_font (f, "-*-monaco-*-12-*-mac-roman");
2550 if (! STRINGP (font)) 2540 if (! STRINGP (font))
@@ -2679,17 +2669,28 @@ This function is an internal primitive--use `make-frame' instead. */)
2679 if (EQ (visibility, Qunbound)) 2669 if (EQ (visibility, Qunbound))
2680 visibility = Qt; 2670 visibility = Qt;
2681 2671
2682#if 0 /* MAC_TODO: really no iconify on Mac */
2683 if (EQ (visibility, Qicon)) 2672 if (EQ (visibility, Qicon))
2684 x_iconify_frame (f); 2673 x_iconify_frame (f);
2685 else 2674 else if (! NILP (visibility))
2686#endif
2687 if (! NILP (visibility))
2688 x_make_frame_visible (f); 2675 x_make_frame_visible (f);
2689 else 2676 else
2690 /* Must have been Qnil. */ 2677 /* Must have been Qnil. */
2691 ; 2678 ;
2692 } 2679 }
2680
2681 /* Initialize `default-minibuffer-frame' in case this is the first
2682 frame on this display device. */
2683 if (FRAME_HAS_MINIBUF_P (f)
2684 && (!FRAMEP (kb->Vdefault_minibuffer_frame)
2685 || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))))
2686 kb->Vdefault_minibuffer_frame = frame;
2687
2688 /* All remaining specified parameters, which have not been "used"
2689 by x_get_arg and friends, now go in the misc. alist of the frame. */
2690 for (tem = parms; !NILP (tem); tem = XCDR (tem))
2691 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
2692 f->param_alist = Fcons (XCAR (tem), f->param_alist);
2693
2693 UNGCPRO; 2694 UNGCPRO;
2694 2695
2695 /* Make sure windows on this frame appear in calls to next-window 2696 /* Make sure windows on this frame appear in calls to next-window
@@ -2699,9 +2700,11 @@ This function is an internal primitive--use `make-frame' instead. */)
2699 return unbind_to (count, frame); 2700 return unbind_to (count, frame);
2700} 2701}
2701 2702
2703
2702/* FRAME is used only to get a handle on the X display. We don't pass the 2704/* FRAME is used only to get a handle on the X display. We don't pass the
2703 display info directly because we're called from frame.c, which doesn't 2705 display info directly because we're called from frame.c, which doesn't
2704 know about that structure. */ 2706 know about that structure. */
2707
2705Lisp_Object 2708Lisp_Object
2706x_get_focus_frame (frame) 2709x_get_focus_frame (frame)
2707 struct frame *frame; 2710 struct frame *frame;
@@ -2714,6 +2717,39 @@ x_get_focus_frame (frame)
2714 XSETFRAME (xfocus, dpyinfo->x_focus_frame); 2717 XSETFRAME (xfocus, dpyinfo->x_focus_frame);
2715 return xfocus; 2718 return xfocus;
2716} 2719}
2720
2721
2722DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
2723 doc: /* Set the input focus to FRAME.
2724FRAME nil means use the selected frame. */)
2725 (frame)
2726 Lisp_Object frame;
2727{
2728 struct frame *f = check_x_frame (frame);
2729 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
2730
2731 if (dpyinfo->x_focus_frame != f)
2732 {
2733 BLOCK_INPUT;
2734#ifdef MAC_OSX
2735 ActivateWindow (ActiveNonFloatingWindow (), false);
2736 ActivateWindow (FRAME_MAC_WINDOW (f), true);
2737#else
2738#if !TARGET_API_MAC_CARBON
2739 /* SelectWindow (Non-Carbon) does not issue deactivate events if
2740 the possibly inactive window that is to be selected is
2741 already the frontmost one. */
2742 SendBehind (FRAME_MAC_WINDOW (f), NULL);
2743#endif
2744 /* This brings the window to the front. */
2745 SelectWindow (FRAME_MAC_WINDOW (f));
2746#endif
2747 UNBLOCK_INPUT;
2748 }
2749
2750 return Qnil;
2751}
2752
2717 2753
2718DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, 2754DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
2719 doc: /* Internal function called by `color-defined-p', which see. */) 2755 doc: /* Internal function called by `color-defined-p', which see. */)
@@ -3664,7 +3700,7 @@ x_create_tip_frame (dpyinfo, parms, text)
3664 font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1"); 3700 font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1");
3665 /* If those didn't work, look for something which will at least work. */ 3701 /* If those didn't work, look for something which will at least work. */
3666 if (! STRINGP (font)) 3702 if (! STRINGP (font))
3667 font = x_new_fontset (f, build_string ("fontset-mac")); 3703 font = x_new_fontset (f, build_string ("fontset-standard"));
3668 if (! STRINGP (font)) 3704 if (! STRINGP (font))
3669 font = x_new_font (f, "-*-monaco-*-12-*-mac-roman"); 3705 font = x_new_font (f, "-*-monaco-*-12-*-mac-roman");
3670 if (! STRINGP (font)) 3706 if (! STRINGP (font))
@@ -4513,6 +4549,7 @@ Chinese, Japanese, and Korean. */);
4513 defsubr (&Sx_close_connection); 4549 defsubr (&Sx_close_connection);
4514 defsubr (&Sx_display_list); 4550 defsubr (&Sx_display_list);
4515 defsubr (&Sx_synchronize); 4551 defsubr (&Sx_synchronize);
4552 defsubr (&Sx_focus_frame);
4516 4553
4517 /* Setting callback functions for fontset handler. */ 4554 /* Setting callback functions for fontset handler. */
4518 get_font_info_func = x_get_font_info; 4555 get_font_info_func = x_get_font_info;
diff --git a/src/macterm.c b/src/macterm.c
index 8e736f73124..8439a79d65c 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1028,12 +1028,15 @@ static int cg_text_anti_aliasing_threshold = 8;
1028static void 1028static void
1029init_cg_text_anti_aliasing_threshold () 1029init_cg_text_anti_aliasing_threshold ()
1030{ 1030{
1031 Lisp_Object val = 1031 int threshold;
1032 Fmac_get_preference (build_string ("AppleAntiAliasingThreshold"), 1032 Boolean valid_p;
1033 Qnil, Qnil, Qnil);
1034 1033
1035 if (INTEGERP (val)) 1034 threshold =
1036 cg_text_anti_aliasing_threshold = XINT (val); 1035 CFPreferencesGetAppIntegerValue (CFSTR ("AppleAntiAliasingThreshold"),
1036 kCFPreferencesCurrentApplication,
1037 &valid_p);
1038 if (valid_p)
1039 cg_text_anti_aliasing_threshold = threshold;
1037} 1040}
1038 1041
1039static int 1042static int
@@ -5301,7 +5304,10 @@ mac_define_frame_cursor (f, cursor)
5301 struct frame *f; 5304 struct frame *f;
5302 Cursor cursor; 5305 Cursor cursor;
5303{ 5306{
5304 SetThemeCursor (cursor); 5307 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
5308
5309 if (dpyinfo->x_focus_frame == f)
5310 SetThemeCursor (cursor);
5305} 5311}
5306 5312
5307 5313
@@ -5856,7 +5862,7 @@ x_raise_frame (f)
5856 if (f->async_visible) 5862 if (f->async_visible)
5857 { 5863 {
5858 BLOCK_INPUT; 5864 BLOCK_INPUT;
5859 SelectWindow (FRAME_MAC_WINDOW (f)); 5865 BringToFront (FRAME_MAC_WINDOW (f));
5860 UNBLOCK_INPUT; 5866 UNBLOCK_INPUT;
5861 } 5867 }
5862} 5868}
@@ -5870,7 +5876,7 @@ x_lower_frame (f)
5870 if (f->async_visible) 5876 if (f->async_visible)
5871 { 5877 {
5872 BLOCK_INPUT; 5878 BLOCK_INPUT;
5873 SendBehind (FRAME_MAC_WINDOW (f), nil); 5879 SendBehind (FRAME_MAC_WINDOW (f), NULL);
5874 UNBLOCK_INPUT; 5880 UNBLOCK_INPUT;
5875 } 5881 }
5876} 5882}
@@ -5983,7 +5989,6 @@ x_make_frame_visible (f)
5983 5989
5984 f->output_data.mac->asked_for_visible = 1; 5990 f->output_data.mac->asked_for_visible = 1;
5985 5991
5986 SelectWindow (FRAME_MAC_WINDOW (f));
5987 CollapseWindow (FRAME_MAC_WINDOW (f), false); 5992 CollapseWindow (FRAME_MAC_WINDOW (f), false);
5988 ShowWindow (FRAME_MAC_WINDOW (f)); 5993 ShowWindow (FRAME_MAC_WINDOW (f));
5989 } 5994 }
@@ -9602,6 +9607,8 @@ XTread_socket (sd, expected, hold_quit)
9602 /* So people can tell when we have read the available input. */ 9607 /* So people can tell when we have read the available input. */
9603 input_signal_count++; 9608 input_signal_count++;
9604 9609
9610 ++handling_signal;
9611
9605#if USE_CARBON_EVENTS 9612#if USE_CARBON_EVENTS
9606 toolbox_dispatcher = GetEventDispatcherTarget (); 9613 toolbox_dispatcher = GetEventDispatcherTarget ();
9607 9614
@@ -10242,6 +10249,7 @@ XTread_socket (sd, expected, hold_quit)
10242 } 10249 }
10243#endif 10250#endif
10244 10251
10252 --handling_signal;
10245 UNBLOCK_INPUT; 10253 UNBLOCK_INPUT;
10246 return count; 10254 return count;
10247} 10255}
diff --git a/src/window.c b/src/window.c
index f71d26f6d50..c21e95cbef0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4284,6 +4284,14 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4284 { 4284 {
4285 if (!NILP (XWINDOW (window)->next)) 4285 if (!NILP (XWINDOW (window)->next))
4286 { 4286 {
4287 /* This may happen for the minibuffer. In that case
4288 the window_deletion_count check below does not work. */
4289 if (XINT (CURSIZE (p->next)) - delta <= 0)
4290 {
4291 Fset_window_configuration (old_config);
4292 error ("Cannot adjust window size as specified");
4293 }
4294
4287 XSETINT (CURBEG (p->next), 4295 XSETINT (CURBEG (p->next),
4288 XINT (CURBEG (p->next)) + delta); 4296 XINT (CURBEG (p->next)) + delta);
4289 size_window (p->next, XINT (CURSIZE (p->next)) - delta, 4297 size_window (p->next, XINT (CURSIZE (p->next)) - delta,
diff --git a/src/xterm.c b/src/xterm.c
index 0d1ea7636f2..2eb92e8a532 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6475,6 +6475,12 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6475 so update things that depend on mouse position. */ 6475 so update things that depend on mouse position. */
6476 if (f && !f->output_data.x->hourglass_p) 6476 if (f && !f->output_data.x->hourglass_p)
6477 note_mouse_movement (f, &event.xmotion); 6477 note_mouse_movement (f, &event.xmotion);
6478#ifdef USE_GTK
6479 /* We may get an EnterNotify on the buttons in the toolbar. In that
6480 case we moved out of any highlighted area and need to note this. */
6481 if (!f && last_mouse_glyph_frame)
6482 note_mouse_movement (last_mouse_glyph_frame, &event);
6483#endif
6478 goto OTHER; 6484 goto OTHER;
6479 6485
6480 case FocusIn: 6486 case FocusIn:
@@ -6502,6 +6508,11 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6502 if (any_help_event_p) 6508 if (any_help_event_p)
6503 do_help = -1; 6509 do_help = -1;
6504 } 6510 }
6511#ifdef USE_GTK
6512 /* See comment in EnterNotify above */
6513 else if (last_mouse_glyph_frame)
6514 note_mouse_movement (last_mouse_glyph_frame, &event);
6515#endif
6505 goto OTHER; 6516 goto OTHER;
6506 6517
6507 case FocusOut: 6518 case FocusOut: