diff options
| author | Adrian Robert | 2008-10-22 12:51:29 +0000 |
|---|---|---|
| committer | Adrian Robert | 2008-10-22 12:51:29 +0000 |
| commit | cb83c00bd13b63c0d0752698e4ad441968bc04ac (patch) | |
| tree | 5d084c901b9b4d0962875f80be6d6351b92de1bb /src | |
| parent | 20a360544d7e9f11e2fb2eed73e7f5e6a0d152bb (diff) | |
| download | emacs-cb83c00bd13b63c0d0752698e4ad441968bc04ac.tar.gz emacs-cb83c00bd13b63c0d0752698e4ad441968bc04ac.zip | |
* lisp/version.el (emacs-version): Change '*Step' to 'NS' for consistency with other documentation. * src/nsfns.m (ns_appkit_version): New function. (x-server-version): Use it. (syms_of_nsfns): Define ns-version-string here, not nsterm.m. (x-server-vendor): Don't check_ns(). * nsterm.m (syms_of_nsterm): Drop ns-version-string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/nsfns.m | 45 | ||||
| -rw-r--r-- | src/nsterm.m | 7 |
3 files changed, 44 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c4d36b09126..d853d5b55a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2008-10-02 Adrian Robert <Adrian.B.Robert@gmail.com> | ||
| 2 | |||
| 3 | * nsfns.m (ns_appkit_version): New function. | ||
| 4 | (x-server-version): Use it. | ||
| 5 | (syms_of_nsfns): Define ns-version-string here, not nsterm.m. | ||
| 6 | (x-server-vendor): Don't check_ns(). | ||
| 7 | |||
| 8 | * nsterm.m (syms_of_nsterm): Drop ns-version-string. | ||
| 9 | |||
| 1 | 2008-10-22 Juanma Barranquero <lekktu@gmail.com> | 10 | 2008-10-22 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 11 | ||
| 3 | * w32fns.c (unwind_create_frame) [!GLYPH_DEBUG]: Fix xassert. | 12 | * w32fns.c (unwind_create_frame) [!GLYPH_DEBUG]: Fix xassert. |
diff --git a/src/nsfns.m b/src/nsfns.m index f14851b698f..459c058f7ca 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -86,7 +86,10 @@ char panelOK = 0; | |||
| 86 | 86 | ||
| 87 | /* Alist of elements (REGEXP . IMAGE) for images of icons associated | 87 | /* Alist of elements (REGEXP . IMAGE) for images of icons associated |
| 88 | to frames.*/ | 88 | to frames.*/ |
| 89 | Lisp_Object Vns_icon_type_alist; | 89 | static Lisp_Object Vns_icon_type_alist; |
| 90 | |||
| 91 | /* Toolkit version support. */ | ||
| 92 | static Lisp_Object Vns_version_string; | ||
| 90 | 93 | ||
| 91 | EmacsTooltip *ns_tooltip; | 94 | EmacsTooltip *ns_tooltip; |
| 92 | 95 | ||
| @@ -950,6 +953,25 @@ ns_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 950 | } | 953 | } |
| 951 | 954 | ||
| 952 | 955 | ||
| 956 | #define Str(x) #x | ||
| 957 | #define Xstr(x) Str(x) | ||
| 958 | |||
| 959 | static Lisp_Object | ||
| 960 | ns_appkit_version () | ||
| 961 | { | ||
| 962 | char tmp[80]; | ||
| 963 | |||
| 964 | #ifdef NS_IMPL_GNUSTEP | ||
| 965 | sprintf(tmp, "gnustep-gui-%s", Xstr(GNUSTEP_GUI_VERSION)); | ||
| 966 | #elif defined(NS_IMPL_COCOA) | ||
| 967 | sprintf(tmp, "apple-appkit-%.2f", NSAppKitVersionNumber); | ||
| 968 | #else | ||
| 969 | tmp = "ns-unknown"; | ||
| 970 | #endif | ||
| 971 | return build_string (tmp); | ||
| 972 | } | ||
| 973 | |||
| 974 | |||
| 953 | static void | 975 | static void |
| 954 | x_icon (struct frame *f, Lisp_Object parms) | 976 | x_icon (struct frame *f, Lisp_Object parms) |
| 955 | /* -------------------------------------------------------------------------- | 977 | /* -------------------------------------------------------------------------- |
| @@ -1019,6 +1041,13 @@ frame_parm_handler ns_frame_parm_handlers[] = | |||
| 1019 | }; | 1041 | }; |
| 1020 | 1042 | ||
| 1021 | 1043 | ||
| 1044 | |||
| 1045 | /* ========================================================================== | ||
| 1046 | |||
| 1047 | Lisp definitions | ||
| 1048 | |||
| 1049 | ========================================================================== */ | ||
| 1050 | |||
| 1022 | DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, | 1051 | DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, |
| 1023 | 1, 1, 0, | 1052 | 1, 1, 0, |
| 1024 | doc: /* Make a new Nextstep window, called a \"frame\" in Emacs terms. | 1053 | doc: /* Make a new Nextstep window, called a \"frame\" in Emacs terms. |
| @@ -1321,12 +1350,6 @@ be shared by the new frame. */) | |||
| 1321 | } | 1350 | } |
| 1322 | 1351 | ||
| 1323 | 1352 | ||
| 1324 | /* ========================================================================== | ||
| 1325 | |||
| 1326 | Lisp definitions | ||
| 1327 | |||
| 1328 | ========================================================================== */ | ||
| 1329 | |||
| 1330 | DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, | 1353 | DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, |
| 1331 | doc: /* Set the input focus to FRAME. | 1354 | doc: /* Set the input focus to FRAME. |
| 1332 | FRAME nil means use the selected frame. */) | 1355 | FRAME nil means use the selected frame. */) |
| @@ -1575,7 +1598,6 @@ If omitted or nil, the selected frame's display is used. */) | |||
| 1575 | (display) | 1598 | (display) |
| 1576 | Lisp_Object display; | 1599 | Lisp_Object display; |
| 1577 | { | 1600 | { |
| 1578 | check_ns (); | ||
| 1579 | #ifdef NS_IMPL_GNUSTEP | 1601 | #ifdef NS_IMPL_GNUSTEP |
| 1580 | return build_string ("GNU"); | 1602 | return build_string ("GNU"); |
| 1581 | #else | 1603 | #else |
| @@ -1592,8 +1614,7 @@ See also the function `ns-server-vendor'. */) | |||
| 1592 | (display) | 1614 | (display) |
| 1593 | Lisp_Object display; | 1615 | Lisp_Object display; |
| 1594 | { | 1616 | { |
| 1595 | /* FIXME: return GUI version on GNUstep, ?? on OS X */ | 1617 | return ns_appkit_version (); |
| 1596 | return build_string ("1.0"); | ||
| 1597 | } | 1618 | } |
| 1598 | 1619 | ||
| 1599 | 1620 | ||
| @@ -2640,6 +2661,10 @@ When you miniaturize a Group, Summary or Article frame, Gnus.tiff will | |||
| 2640 | be used as the image of the icon representing the frame. */); | 2661 | be used as the image of the icon representing the frame. */); |
| 2641 | Vns_icon_type_alist = Fcons (Qt, Qnil); | 2662 | Vns_icon_type_alist = Fcons (Qt, Qnil); |
| 2642 | 2663 | ||
| 2664 | DEFVAR_LISP ("ns-version-string", &Vns_version_string, | ||
| 2665 | doc: /* Toolkit version for NS Windowing. */); | ||
| 2666 | Vns_version_string = ns_appkit_version (); | ||
| 2667 | |||
| 2643 | defsubr (&Sns_read_file_name); | 2668 | defsubr (&Sns_read_file_name); |
| 2644 | defsubr (&Sns_get_resource); | 2669 | defsubr (&Sns_get_resource); |
| 2645 | defsubr (&Sns_set_resource); | 2670 | defsubr (&Sns_set_resource); |
diff --git a/src/nsterm.m b/src/nsterm.m index 245dff4930e..5cd64f1d4a3 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -6379,13 +6379,6 @@ baseline level. The default value is nil. */); | |||
| 6379 | 6379 | ||
| 6380 | /* Tell emacs about this window system. */ | 6380 | /* Tell emacs about this window system. */ |
| 6381 | Fprovide (intern ("ns"), Qnil); | 6381 | Fprovide (intern ("ns"), Qnil); |
| 6382 | /* TODO: try to move this back into lisp, ns-win.el loaded too late | ||
| 6383 | right now */ | ||
| 6384 | { | ||
| 6385 | Lisp_Object args[3] = { intern ("ns-version-string"), build_string ("9.0"), | ||
| 6386 | build_string ("NS Window system port version number.") }; | ||
| 6387 | Fdefconst (Flist (3, args)); | ||
| 6388 | } | ||
| 6389 | } | 6382 | } |
| 6390 | 6383 | ||
| 6391 | 6384 | ||